- Job ships that are spawned in instead of being built.
- Shipyards building ships only to send them into a dummy cluster where they'll be destroyed.
- AI factions not using money.
Additional goals in the scope
- Try to fix multi-ware production modules by making it a parallel production.
(I'm thinking of sub-modules, each with only one ware. The production rate will have to be toned down, but hey, "slower but stable" is infinitely better than the "all stop" we get right now.)
- Optionally, put in some upkeep modules that consume resources, creating a secondary resource sink.
The additional goals should be moderately simple.
Just a little juggling around of some components and adding a few new ones.
The primary goals will need background scripts that handle "faction AI", reworked shipyard scripts, reworked station scripts...a lot of work.
Currently working on the shipyard framework.
This framework needs to be done before most of the other stuff can be touched.
Shipyard will now check for available build modules, then check the build order queue for a ship it can build with those modules.
(I'll also need to add a resource check as well.)
Format for the build order queue entry will look something like this.
Code: Select all
[cluster, owner, ship macro, [drone loadout], 'initializer script name', [parameters for initializer script]]
Owner will filter out hostile factions that shouldn't be able to order from the particular shipyard in the first place.
Macro will, among many other important things, check if any of the available build modules are suitable for building the said ship.
Failing to build anything while going through the list will schedule another check 5~10 minutes later.
Built ships will now run their "initializer" scripts.
These scripts will specifically be made to run all the checks they need to figure out which station to work for (if any) and which script they should finally run.
(For example, Pirates will have "neutral" as the faction in the queue, but the script will take the ship to a safe location, then change ownership.)
I had to create a workaround for adding things to the build order queue.
Having multiple entities access the same list at the same time is NEVER good, especially if ANY of them are accessing to modify data.
I already have a working "lock" mechanism that puts other entities that use the same mechanism on hold.
This system relies on the script command "wait", a blocking action, which can NOT be used in interrupt blocks, and interrupt blocks are where we'd mostly find what we need to add.
Signalling a cue (with the lock mechanism) that handles the addition would be good, but AI scripts can't signal cues. (Doh!)
I created a cue actor that'll exist for the sole purpose of hijacking the "event_object_signalled" which the AI scripts CAN fire off.