Newbie Question: |
Ive played Space Empires since SE3, and am now trying my hand at modding. I am currently programming my first Mod, which adds a new racial tech.
Im trying to make the last piece of vr 1.0, but I can't figure out how do to it. I am trying to add an event that would make a ship that has just been captured by boarding parties (which may be a new component that comes with the mod since this is a racial tech) automatically have its tech analyzed without having to be deconstructed; but i don't know how to change the event. (I think its probably in the external evend file, which comes to problem 2)
My second problem is that I don't know how to access the CSF files; I have checked numerous places including SpaceEmpires.net's Wiki, and haven't been able to find answers.
Any help is appreciated! Thanks!
Re: Newbie Question:
There is no "event" as such run after a ship is captured. The event script only contains the randomly generated events that might occur once per turn. The script is run every turn though, so you can add neat effects to the game via this script. I'm not sure how you could check to see if a ship was just captured on the current turn, however.
Re: Newbie Question:
As I said, there are no such things. All of the code that handles such "events" is in the executable.
Re: Newbie Question:
One thing you might try, is to save the list of ships each empire owns.
Then on the next turn, you can check to see if any of the player's ship IDs are in the list of a different player. (IE; last turn, that ship ID was owned by somebody else)
You would have to avoid false positives such as a ship being destroyed, and its ID number being reused for a new construction.
In GGmod, new ships are easily identified by looking for zero experience. (You need an experience system where ships can't hit zero by any other means)




Re: Newbie Question:
Go to the stock folder and look for a subdirectory named Utilities. Inside this folder is one for the ScriptParser which has a subfolder names SE5MainScripts. Inside this is the text file for the Event Script and you'll be able to see all the various subroutines/functions that are used to execute the end of turn events. Your custom event will fit somewhere inside this. Remember that you will have to run the ScriptParser to get a new csf that includes your code.