Modding Rundown: PY Scripts

Started by Teancum, April 19, 2007, 06:04PM

Previous topic - Next topic
I give you the Equip section of the Shop menu.  Achieved by copying everything from XML2/ui/menus, then saying 'no' to all overwrites.  After that I added this line to my script.  You MUST do this to get these menus to appear in MUA.

shopMenu("equip")


codexMenu(1) and codexMenu(0) --Used for viewing heroes/villains


I added a bunch more script descriptions last night to the first two posts.  See them for a description.  Also, on page 2 I've set a bunch of functions to green that I know work, and tried to comment on some other ones.

setFollowingHero("character", "TRUE/FALSE" )
spawnEffect("[entity]", "[effect]", " [x/y/z] ", " [p/y/r] " )
alive("[entity]")
cameraShake(4.000, 3.000 )
vibrate("ENTITY", "RUMBLE", 0.200, 2.200 )
gameover("[something from strings.engb]")
lockControls(float)
dropWeapon("[entity]", "TRUE/FALSE" )
strcatint("[variable]", num )
waittimed([float])
createPopupDialogXml('dialog name')
iadd([variable name], [number])

August 23, 2008, 02:14PM #32 Last Edit: October 22, 2009, 09:51AM by Teancum
More PY functions:


instring --probably checks to see if some sort of value exists in a string.  So if you were looking for "Ghost" in the string "Ghost Rider is cool" it would find it?
strveci --dunno
strcatstr --see pg1
idiv --divides two integers
imul --multiplies two integers
isub --subracts two integers
iadd --adds two integers
fdiv --divides two floats
fmul --multiplies two floats
fsub --subracts two floats
fadd --adds two floats
waitsignal --waits for the 'ok to skip' signal from a cinematic
waittimed --waits [a] number of milliseconds?

So I've done lots and lots and lots of experimenting, only to find out the codex menu (character bios) won't work in MUA.  There are EXE calls that it needs that are missing in MUA (but present in XML2).  I can actually get it to review characters in XML2, but not MUA.

Quote from: Teancum on April 19, 2007, 06:04PM
Definition of specific static values

"_HERO1_" --First hero slot
"_HERO2_" --Second hero slot
"_HERO3_" --Third hero slot
"_HERO4_" --Fourth hero slot
"_OWNER_" --Performs verb on whoever called it
"_ACTIVATOR_" --Similar to _OWNER_, but used when you activate something.  (A good example is picking up a focus upgrade)

I found this one today:
"_ACTIVE_HERO_" -- Name explains itself, it's the character the player currently uses.

Huh, I can't believe I never added that.  Used to use it all the time.  Thanks Gevth!

So Teancum was using the hero thing, did it work?
Life, it's a simple thing; it doesn't shout or scream or even ignore you. No life takes what it gets, it expects that it is fate, it expects that the only thing stopping it's self is its self. But what if, what if the only thing stopping you from becoming you is some-one you love. That's my life...

you can see it in the cam mod,personaly i  think it works lol
My deviant art page!!!
$$$ http://sabrerine911.deviantart.com/ $$$

Hey is there any disabeling and enabeling script function,or something like that?It would realy come in handy to fix the cutscene problem for the cam mod!
My deviant art page!!!
$$$ http://sabrerine911.deviantart.com/ $$$

Nope.  That's why I never did it, because you'd need to edit every single script to account for it.

And who has that amount time on their hands? How many .py scripts are their? Let's see a few for every simulator then there's the missions and other stuff I have no idea about. So it's alot of time just to edit them.
Life, it's a simple thing; it doesn't shout or scream or even ignore you. No life takes what it gets, it expects that it is fate, it expects that the only thing stopping it's self is its self. But what if, what if the only thing stopping you from becoming you is some-one you love. That's my life...

You're looking at least 150 scripts.  Each one of those has to be modified, and they won't always be able to be modified in the same way.

Does anybody know a script file that includes setActivator ? Because I'm currently using it in a script (I've tried both setActivator("_HERO1_") and setActivator("captainamerica")), and it's not turning anyone to an _ACTIVATOR_. I'd like to check how it's implemented in context.

On the other side, apparently playanim can only play animations from the character's own animation files (xx_character.igb, etc.), since none of the inputs refer to a file (as opposed to other functions, like sound). I'll get deeper into this later.

SetActivator() has to be called by activating something, like a terminal.  When it's activated you can change it via SetActivator().  At least that's what I've found.  I've had a lot of problems with that verb.

Bummer, guess that means changeActivator can't be called from powerstyles. Thanks for the info.