delayed jobs
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
delayed jobs
Hi
It is obvious that, with time, player s power increase while factions stagnates.
Is it possible to script delayed jobs in jobs file ? For exemple a job which will not be active at start and ''wake up'' after a certain delay. Something else may be ?
If it cant be done in jobs file, is there a known trick to script it elsewhere ?
It is obvious that, with time, player s power increase while factions stagnates.
Is it possible to script delayed jobs in jobs file ? For exemple a job which will not be active at start and ''wake up'' after a certain delay. Something else may be ?
If it cant be done in jobs file, is there a known trick to script it elsewhere ?
Re: delayed jobs
There are a couple of ways of doing this,
One is to set a timer in the job which says when the ships will start to spawn. e.g.
You can mess around with the timer settings or instead of using the time command you can just call the job/jobs from a script by first setting the Job to inactive then calling it from a script,
then calling the job from a script using
hope this helps.
One is to set a timer in the job which says when the ships will start to spawn. e.g.
Code: Select all
<job id="timed_argon_dronecarrier_patrol_m_sector" name="{20204,5001}" >
<modifiers commandeerable="true"/>
<orders>
<order order="Patrol" default="true">
<param name="range" value="class.sector"/>
</order>
</orders>
<category faction="argon" tags="[factionlogic, military, frigate]" size="ship_m"/>
<quota galaxy="8" maxgalaxy="20" sector="2"/>
<time start="1800" interval="60"/>
<location class="galaxy" macro="xu_ep2_universe_macro" faction="argon" relation="self" comparison="exact"/>
<environment buildatshipyard="true"/>
<ship>
<select faction="argon" tags="[military, frigate]" size="ship_m"/>
<loadout>
<level min="0.4" max="1.0"/>
</loadout>
<units>
<unit category="unitcategory.defence" min="8" max="12"/>
</units>
<owner exact="argon" overridenpc="true"/>
</ship>
</job>
Code: Select all
<job id="timed_argon_dronecarrier_patrol_m_sector" name="{20204,5001}" startactive=false">
Code: Select all
<set_job_active job="'timed_argon_dronecarrier_patrol_m_sector'" />
Re: delayed jobs
Thanks for the answer Dr Reed.
Re: delayed jobs
It isn't that simple. Yes, you can activate jobs on a timer, but the issue is that they won't always get built. I played around with it a lot when I was initially making FOCW but I decided to go a different way with forcing ships to get built. I noticed that even though I was activating the jobs, they wouldn't necessarily be built. I think there is something hardcoded that basically cancels ship orders if the shipyards are not often well stocked which usually happens often and then you have a universe with fewer and fewer ships. I don't know exactly though, this is just some speculation from my own experience.
Re: delayed jobs
Interresting feedback Blackrain.
Otherwise, what means interval="60". Is it a mandatory parameter ?
Otherwise, what means interval="60". Is it a mandatory parameter ?
Re: delayed jobs
Question related to this, instead of tieing it to time, is it possible to tie jobs to certain plots? examples would be segaris pioneers when they finish with Terra Nova, or with the yaki. In effect delaying jobs but instead of timer, tieing it to certain progress of the player.
Re: delayed jobs
For interval I will presume the job will be check every 60 minutes.
Re: delayed jobs
Yes, you can tie job activation to plots, etc. However, I still question how good the game rebuilds its ships. Hence the reason I made FOCW. In a vanilla game, I always felt that ships decrease over time and don't ever seem to reach the same levels as when the game first started. I don't know 100% yet why this is. It seems that those ships are activated when the game starts but then after that it relies on md scripts to order ships when needed. It may be that the jobs only get activated once or something else going on as I mentioned in my prior post.KalisaFox wrote: ↑Thu, 12. May 22, 22:39Question related to this, instead of tieing it to time, is it possible to tie jobs to certain plots? examples would be segaris pioneers when they finish with Terra Nova, or with the yaki. In effect delaying jobs but instead of timer, tieing it to certain progress of the player.
Re: delayed jobs
has to do with the ships spawning up to galaxy even if it doesn't meet all requirements I thinkBlackRain wrote: ↑Fri, 13. May 22, 00:51Yes, you can tie job activation to plots, etc. However, I still question how good the game rebuilds its ships. Hence the reason I made FOCW. In a vanilla game, I always felt that ships decrease over time and don't ever seem to reach the same levels as when the game first started. I don't know 100% yet why this is. It seems that those ships are activated when the game starts but then after that it relies on md scripts to order ships when needed. It may be that the jobs only get activated once or something else going on as I mentioned in my prior post.KalisaFox wrote: ↑Thu, 12. May 22, 22:39Question related to this, instead of tieing it to time, is it possible to tie jobs to certain plots? examples would be segaris pioneers when they finish with Terra Nova, or with the yaki. In effect delaying jobs but instead of timer, tieing it to certain progress of the player.
Re: delayed jobs
So I can presume the delay is also in seconds.It should be seconds I think but you can set it up to be minutes or seconds.
You speak about normal jobs ? or jobs you created and which were supposed to activate under special conditions ?I still question how good the game rebuilds its ships. Hence the reason I made FOCW. In a vanilla game, I always felt that ships decrease over time and don't ever seem to reach the same levels as when the game first started. I don't know 100% yet why this is
If it is normal jobs, for what I experienced, and as long as owner have enough facilities and ressources, it stay stable. At least it stay stable for games I use to play and which dont excees 200 to 250 hours.
Testing mods, involving xenons as important criteria, I use to save regulary, then edit the save and count the number or K and I. One of the last exemple I have gave this result.
Hour 9 ; 11 I 75 K
hour 27 ; 11 I 92 K
Hour 55 ; 11 I 92 K
hour 85 ; 11 I 89 K
Hour 118 ; 11 I 86 K
hour131 ; 11 I 89 K
hour154 ; 11 I 89 K
In this game xenon were in fast expansion during the first two days, then it slowdown up to a stagnante situation. It means roughly that their facilities and supply lines had never be threatened. At least 2 I and a dozen of k were set to stay in sector and not allowed to leave.
Re: delayed jobs
I am not so sure about that. I haven't played vanilla in a very long time and haven't played without FOCW in a long time, but I remember that as the game progressed, the number of ships steeply decreased. I mean it may be that maxgalaxy sets a maximum allowed, but it seemed as if it never reached those numbers. This led me to believe there might be something else at play. For example, ship ordered being canceled due to some other reasons. Like I said, it is why I force ships to be built in FOCW using a somewhat unintended way of doing things. Just setting it to activate and setting a max galaxy always gave me problems before I started forcing ships to be built. I could be wrong though and maybe things have changed or there is some other explanation. I don't have the time to do more testing.DeadAirRT wrote: ↑Fri, 13. May 22, 03:05has to do with the ships spawning up to galaxy even if it doesn't meet all requirements I thinkBlackRain wrote: ↑Fri, 13. May 22, 00:51Yes, you can tie job activation to plots, etc. However, I still question how good the game rebuilds its ships. Hence the reason I made FOCW. In a vanilla game, I always felt that ships decrease over time and don't ever seem to reach the same levels as when the game first started. I don't know 100% yet why this is. It seems that those ships are activated when the game starts but then after that it relies on md scripts to order ships when needed. It may be that the jobs only get activated once or something else going on as I mentioned in my prior post.KalisaFox wrote: ↑Thu, 12. May 22, 22:39Question related to this, instead of tieing it to time, is it possible to tie jobs to certain plots? examples would be segaris pioneers when they finish with Terra Nova, or with the yaki. In effect delaying jobs but instead of timer, tieing it to certain progress of the player.
Re: delayed jobs
Yeah but you can't use Xenon as an example because their economy functions completely different from the npc factions. They only need to build their own ships and they can more easily stock their shipyards. Also, it depends on whether fleets are being destroyed or not. If it is a mostly stale game, there wouldn't be many getting destroyed so the numbers might stay stable. However, with factions like Paranid and HOP constantly at war, the numbers never seem to get back to what they were at the beginning. I mean, maybe things have changed a lot since I tested that though and it might be different now. When I was first making FOCW and using the normal way of jobs, hardly any ships were built from the ones I added.Malchar wrote: ↑Fri, 13. May 22, 04:48So I can presume the delay is also in seconds.It should be seconds I think but you can set it up to be minutes or seconds.
You speak about normal jobs ? or jobs you created and which were supposed to activate under special conditions ?I still question how good the game rebuilds its ships. Hence the reason I made FOCW. In a vanilla game, I always felt that ships decrease over time and don't ever seem to reach the same levels as when the game first started. I don't know 100% yet why this is
If it is normal jobs, for what I experienced, and as long as owner have enough facilities and ressources, it stay stable. At least it stay stable for games I use to play and which dont excees 200 to 250 hours.
Testing mods, involving xenons as important criteria, I use to save regulary, then edit the save and count the number or K and I. One of the last exemple I have gave this result.
Hour 9 ; 11 I 75 K
hour 27 ; 11 I 92 K
Hour 55 ; 11 I 92 K
hour 85 ; 11 I 89 K
Hour 118 ; 11 I 86 K
hour131 ; 11 I 89 K
hour154 ; 11 I 89 K
In this game xenon were in fast expansion during the first two days, then it slowdown up to a stagnante situation. It means roughly that their facilities and supply lines had never be threatened. At least 2 I and a dozen of k were set to stay in sector and not allowed to leave.
Re: delayed jobs
I paid attention for xenons, because they are the only one it is important to check.
There is players 's shipyard to supply NPC s factions with ships. These factions just print money without out limit and pick up their ship from the player. You can say and what about factions who are not friendly with players ? --> Most players seems to like easy game, so I thinks ennemies factions would have trouble and it will satisfy players Anyway players make the sun shine or make it rain, usually at day 4 or 5, so it dont change a lot of things.
If I cross what you experienced ; ships decline for normal npc faction, and what I experienced with xenons ships, it seems the problen, could be related to a lack of ressources, no ? Usually in my games npc shipyard are in constant shortage of hull parts, then turrets components, weapons coponents and advanced electronic.
There is players 's shipyard to supply NPC s factions with ships. These factions just print money without out limit and pick up their ship from the player. You can say and what about factions who are not friendly with players ? --> Most players seems to like easy game, so I thinks ennemies factions would have trouble and it will satisfy players Anyway players make the sun shine or make it rain, usually at day 4 or 5, so it dont change a lot of things.
I m not sure about that. How many time have we see xenoos send all their mining ships to suicide, trying to cross or mine in ennemy sectors, until all raw was wasted in the shipyard and xenons will be unable to build miner type S anymore ? Result is usually fade and death after that.They only need to build their own ships and they can more easily stock their shipyards.
If I cross what you experienced ; ships decline for normal npc faction, and what I experienced with xenons ships, it seems the problen, could be related to a lack of ressources, no ? Usually in my games npc shipyard are in constant shortage of hull parts, then turrets components, weapons coponents and advanced electronic.
Re: delayed jobs
Galaxy is the number they try to maintain, not maxgalaxy. Maxgalaxy defaults to 2x galaxy if not set. Any ships above galaxy will move.die after some time and are only ever ordered when logic orders them via the factionlogic tag.BlackRain wrote: ↑Sat, 14. May 22, 01:02I am not so sure about that. I haven't played vanilla in a very long time and haven't played without FOCW in a long time, but I remember that as the game progressed, the number of ships steeply decreased. I mean it may be that maxgalaxy sets a maximum allowed, but it seemed as if it never reached those numbers. This led me to believe there might be something else at play. For example, ship ordered being canceled due to some other reasons. Like I said, it is why I force ships to be built in FOCW using a somewhat unintended way of doing things. Just setting it to activate and setting a max galaxy always gave me problems before I started forcing ships to be built. I could be wrong though and maybe things have changed or there is some other explanation. I don't have the time to do more testing.
Re: delayed jobs
With that, I'm out of this thread. Good luck.Malchar wrote: ↑Sat, 14. May 22, 01:27There is players 's shipyard to supply NPC s factions with ships. These factions just print money without out limit and pick up their ship from the player. You can say and what about factions who are not friendly with players ? --> Most players seems to like easy game