Page 1 of 2

Looking for a specific SCR file

Posted: Thu Apr 17, 2003 6:07 pm
by Lucky Luciano
Does anyone know the specific scr file that controls the localization? Looking for the comand that displays the user name prior to the message. Think it is local.user or something like that maybe ($player). Trying to write a script that needs the player name, but cant figure out how to tell the game to get it. There are alot of commands that are used for a particular instance in reference to the player. (position, time, weapon, stance, etc.) these help the game simulate the actions that take place.

I need the one that calls out the players name.

Please help, I have a nice sister that I can give you! heheheh

-Lucky

Posted: Thu Apr 17, 2003 6:39 pm
by jv_map
As far as I know that's not possible (I want your sister nonetheless :P).

All localizations are in global/localization.txt in pak0.pk3

Posted: Thu Apr 17, 2003 7:00 pm
by Lucky Luciano
The AI tells the program that xxx was shot by xxx in the xxx. Therefor there MUST be a script (or combination of scripts) that tells the game to print that. It is an action that results in another action. It preforms this action therfor there MUST be a code that handles the player name.

Am I just thinking too much? But if the text appears then in has to be getting the source from something !!??

Basically were does the game get the player name in order to print the death message in that way. How does it know to print that Lucky shot so-and-so?

-Lucky

Posted: Thu Apr 17, 2003 7:49 pm
by Yarik
you are right there is. But unfortunatly that is in the MOHAA Icon. if you had a tool that can convert binary code back to human readable code then you can find it. But as faar as I know the Code probably costs over a million bucks. And that would take a lot of money just to change the way servers say stuff.

Posted: Thu Apr 17, 2003 7:50 pm
by nuggets
the names are got from the array's given to players, it finds the player number or bot number that killed who and prints that in there, that's the bit you'll need,

then inside the killed.scr you'll find

start local.attacker local.damage local.inflictor local.position local.direction local.normal local.knockback local.dflags local.meansofdeath local.location:
self.fact = local CreateListener
self.fact.attacker = local.attacker
self.fact.damage = local.damage
self.fact.inflictor = local.inflictor
self.fact.position = local.position
self.fact.direction = local.direction
self.fact.normal = local.normal
self.fact.knockback = local.knockback
self.fact.dflags = local.dflags
self.fact.meansofdeath = local.meansofdeath
self.fact.location = local.location


all this stuff, that's what triggers the localization scripts

depending on what u wanna do u could make ur own global.scr and exec it from the level.scr

do i win the sister now? :D

Posted: Thu Apr 17, 2003 8:10 pm
by Lucky Luciano
I tried using those, maybe i scripted it wrong, I will take a look at it agian. Good to know that I was looking in the right place. The line self.fact.attacker = local.attacker refers to the atacker but the print script would be println=local.attacker or self.fact.attacker??? And were is the script that tells it to look into the localization. How does it know to find information about the death from that particular file and from the right line?

You are however the closest so far so I give you some of my sisters number (949) 768-xxxx hehehe.

Thanks for the info.

-Lucky

Posted: Thu Apr 17, 2003 8:14 pm
by Lucky Luciano
Moreover the line would read:

println=self.fact.attacker + (was shot by) + self.fact.inflictor + (in the) + self.fact.position + (with) + self.fact.meansofdeath

am i to assume that is right???

-Lucky

Posted: Thu Apr 17, 2003 8:36 pm
by nuggets
close!!! :P

try editing the killed.scr file and repacking it in the .pk3 to see if it is definately that script that's being read

you'd need to use "" instead of () when using text though

the killed.scr is called from the .min scripts ;)

Posted: Thu Apr 17, 2003 8:39 pm
by nuggets
btw, how old is this sister of urs? :lol:

and pictures would be good ;)

Posted: Fri Apr 18, 2003 1:54 am
by Lucky Luciano
I have looked through the .min scripts and dont find any reference to the localization. These are particular to each map and not to overall play. Also where does the program get the command to print that so-n-so is "entering the battle". Getting closer to my sisters number!!!! hehehe

Posted: Fri Apr 18, 2003 2:04 am
by nuggets
just how old is she... i can see me doing all of this and then finding out she's 40, married, and has 12 kids, give me proof :P

jsut give me a clue what ur trying to do will ya :D, the "entering the battle" is in the localization.txt

Posted: Fri Apr 18, 2003 2:12 am
by Lucky Luciano
She is Italian, 29 , brown hair and hazel eyes, and worth some scr info... nudge, nudge , wink, wink

-Lucky

Posted: Fri Apr 18, 2003 2:15 am
by Lucky Luciano
As far as what i am trying to do..... lets just say ummm ... I want to create text along with a players name. Similiar to the death message. I have got the message down, I need to figure out how to insert the player name with the text.

-Lucky

Posted: Fri Apr 18, 2003 2:16 am
by nuggets
well... i'll settle for pics ;)

Posted: Fri Apr 18, 2003 2:20 am
by nuggets
will it only be relevant to 1 player or all of them...? if all then just add it into both sides of the localization.txt