EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
[Question] Dynamic station commanded job factions.
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
ravayen





Joined: 25 Jan 2016



PostPosted: Thu, 20. Jul 17, 13:15    Post subject: [Question] Dynamic station commanded job factions. Reply with quote Print

Is there a way to easily change a job entry that has a station as its commander to use the 'current' station owner as its faction to clarify i mean....

<--mining ship spawned with stationx as its commander-->
job id=blahblah
commander=stationx
owner= whoever currently owns stationx

<---instead of the currently used--->
job id= blahblah
commander=stationx
owner=faction
<--hopefully you get the idea-->

basically i want to allow jobs with stations as commanders to change faction if the owner of the station changes but in the shortest way possible.
They dont have to change faction immediately just the next time they spawn after being destroyed they will be spawned as the station owners faction.

Back to top
View user's profile Send private message
Marvin Martian





Joined: 08 Apr 2012
Posts: 2467 on topic

Thank you for registering your game
PostPosted: Thu, 20. Jul 17, 13:42    Post subject: Reply with quote Print

don't know if you can assign a ship to a station by JOBS, because you can't define a Object ID that not exists before the game starts and the object get created

this works on escort jobs for other jobships where the escort is defined in the mainjob, but not based on stations, i think

thats the reason why CWIR use the MD-creation of escorts and (job-)fight-ships
---

you can create jobs for a zone and the modded AI that start first time can search for his new commander, in case you can then also change ownership


i suspect also to use the faction parameter at a cluster/sector/zone won't work very well, i see some debug-logs about "missing" area in case the job can't find a startarea (for the defined faction) at the designated space -- only for the point you come to the idea to create multiple jobs for each faction at the same space

Back to top
View user's profile Send private message
ravayen





Joined: 25 Jan 2016



PostPosted: Thu, 20. Jul 17, 14:03    Post subject: Reply with quote Print

@Marvin Martion

<job id="xen_miner_mineral_medium_a03111" name="{20204,1901}" ignorecommanderwares="true">
<expirationtime min="86400" max="259200"/>
<time interval="800" start="0"/>
<task task="mining.ship.station"/>
<basket basket="xenon_minerals"/>
<quota zone="1"/>
<location class="zone" macro="tzoneCluster_A_Sector03_Zone111_macro"/>
<commander macro="xenon_asteroid_shipyard_macro" entitytype="manager"/>
<ship ref="xen_miner_mineral_medium"/>
<subordinates>
<subordinate job="xen_lfighter_escort"/>
</subordinates>
</job>

A job from cwir jobs.xml denoting a station as its commander by using the manager.

Either way my question isn't related to cwir it's about weather the owner can be changed to the owner of the station instead of a static owner in 'any' jobs file vanilla or other wise by having owner=$stationowner in the job description even if it means adding $stationowner=commander.getfaction at the top of the page.
I'm aware that prob isn't a real command btw Razz

Back to top
View user's profile Send private message
Marvin Martian





Joined: 08 Apr 2012
Posts: 2467 on topic

Thank you for registering your game
PostPosted: Thu, 20. Jul 17, 14:34    Post subject: Reply with quote Print

that <commander macro /> -thing i didn't expected right now

so in case you could modify the mining.ship.station AI

write an MD CUE that runs by a signal and update owner of ship and crew (and followers)

this can done by a single line <signal_objects objects> at init or first line of AI, maybe you can check first this.ship.job == 'myjob'

Back to top
View user's profile Send private message
ravayen





Joined: 25 Jan 2016



PostPosted: Thu, 20. Jul 17, 14:52    Post subject: Reply with quote Print

Sadly my modding skills are extremely lacking and i would have no idea how to start writing that, i generally only edit small variables that seem obvious when i'm looking at them which is why i was hoping i could simply change owner= to something else
If it really is just a simple one liner could you by any chance provide a copy paste version and tell me where to paste it lol :0 thanks for replying btw i've noticed you help people alot on here. Smile

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Control Panel
Login Data
The time now is Wed, 23. May 18, 07:26

All times are GMT + 2 Hours

[ Disclaimer / Impressum ] | [ Privacy Policy / Datenschutz ]

Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.08275 seconds, sql queries = 19