Nexus Modding > Scripting
Scripting Issues
Arparso:
--- Quote ---Choose (weight1, command1, weight2, command2, …., weightN, commandN);
It chooses randomly from N pieces of possibilities, according to the weight (’weight1’ .. ’weightN’). If every weight is 0, than it doesn’t do anything; implicitly, if only one weight is bigger than 0, than it will choose that line
--- End quote ---
The weight basically represents the probability, that the following command(s) will get chosen by the game to get executed. Quick example:
--- Code: ---Choose(
10,
Debug("First choice"),
5,
Debug("Second choice")
);
--- End code ---
In this code snippet, it is 2x more likely, that the "First choice" gets executed instead of the "Second choice". The higher the weight, the more likely it is for the corresponding command(s) to get chosen and thus executed. It is still a random choice, which command gets executed - you just have some influence on their likeliness to happen.
Other weighted commands work similarly.
Hyperion5:
hmm, looking through all the problems and fixes here, really good ideas btw, i notice most are mostly scripting. has anyone tried alternate devices? quick mod from energy cell pobably buggy, but just for concept:
--- Code: ---DEVICETYPE
Name "Shield_Capacitor0"
Category 4 //changed to 'shield' category, now governed by the ENERGYSYSTEM_SHIELD subsystem
Sets 24 60 62 66 100 126 ; //same device sets, still fits in energy cell hardpoint
Automatic //Automatic, stays on, so it's reserve count remains
MaxReserve 20000 //ADDs to Max reserve, stores until device deactivates (automatic device here, so until disabled)
Scanned 140
Hpmax 1100
RepairHP 10
Available
InstallRP 6
Info_Category ""
Info_Size ""
Info_Efficiency 6
Info_Emission 0
DEVICETYPE
--- End code ---
In fact, one could probably re make the shield system as different parts with the right work: shield_cat1: Generators shield_cat2: Capacitors, shield_cat3: Projectors
Just a concept, but the current problem with that is shields are set as a universal value (the actual percent set in tacticsbase.ini, but the actual rule is in execlist.ini) It seems set to activate once a ships collective shield once energy reaches a set percentage so an actual shield capacitor currently wouldn't work too well for when shields have to drop.
you could check my thread (Modifications >>The ExecList?) i'm looking for help finding commands in that file.
The Old Dragon:
Just a quick question... does anyone know how to 'de-weaponise' the techscanner?
At the moment, as soon as you scan something, it's classed as an enemy because you've 'fired' at it. To me this really kind of limits its use as a data recovery tool due to this outcome.
GeoModder:
Can't you rescript it so that 'firing' the scanner makes an ally of the 'targeted' object under certain conditions? Like when engines are off or weapons not activated/loaded?
Mularac:
you can't 'de-weaponise' a weapon, but I think there might a small workarround. Just change the relation back to 'neutral' when the scanner "fires" (using the Fired event) or better even when the ship is 'hit' (can't remember the exact rule that you used there... but I'm possitive there was one). With a bit of luck, it won't be noticed by the player...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version