Nodrak wrote...
There are numerous logical issues with your code, like checking against things that your code has prevented from happening via rerouting the event (if you can reroute events from events.xls). HandleEvent() needs a second paramater or else it passes the event to the object that called HandleEvent(), in this case your script might enter an infinite loop. You could hand the event to player_core before you check for Sten in the party, preventing many issues.
http://social.biowar.../Event_override <- I followed this for event override, it clearly uses HandleEvent(ev), so I doubt you are correct there, or the Wiki should be changed to represent that.
The event you are trying to override is defined in engineevents, rather then events, so your worksheet name would have to be prefixed with engineevents.
Definitely a possibility on that one. I'll have to check that.
I'll also point out that two (Possible errors - Not even confirmed these are both problems) is hardly numerous logical issues.
While looking at this, I became curious, and so I dug around untill I found a sollution everyone will like. In the packages_base M2DA (packages.xls), you will find Sten on line 85. The two black collums border a region that has been 'minimized' for lack of the correct excell term. Click the + above the collum lables to find the class's for your companions.
Player_core limits followers to one spec, so only switch1_class is used. Set the level you want Sten to learn it at, and set the ID for Reaver, 4019. Ofcourse, do this in a seperate worksheet/workbook, prefixed with packages_base (there is a reference to a 2da called packages, but I cannot locate that worksheet). Process that baby into a gda, and there is your Sten mod in one short file. No need for scripts.
It would be, however, 100% In compatible with other mods that might try to replace characters (A rebalancing mod, for example). Given, though, that mine, as is, gives some compatibility issues, I'll probably release both versions, after looking around to ensure that actually does what I want.
Thanks for the help though.
Edit: engineevents worked, now checking for infinite loops.
Edit2: No infinite loops That I can tell - my Print statements aren't spamming thousands of statements.
Talian Kross wrote...
Gralamin wrote...
..., I should be able to give the abilities to Sten either BEFORE you get him, or exactly when you get him.
To do that, you'd have override Sten's dialogue script since that's what triggers him being hired. Wouldn't that be part of the Campaign resources that haven't been released to us yet? (I'm not sure.)
Otherwise, you'll just have to continuously monitor when or if Sten is a member of your party, like so:
void MakeStenAReaver()
{
object oSten = Party_GetFollowerByTag( GEN_FL_STEN );
if( IsObjectValid( oSten ) )
{
if( !HasAbility( oSten, 4019 ) )
{
AddAbility( oSten, 4019 );
}
}
}
And just throw a call to that function in your EVENT_TYPE_MODULE_LOAD block or something.
Or, I can use event override. EVENT_TYPE_MODULE_LOAD is a poor indication, as it isn't called on frequently enough. Saying "You have to do this" is usually an indication of needing to rethink your statement
Modifié par Gralamin, 28 novembre 2009 - 09:09 .