Star Ruler 2

Star Ruler 2

Your stars. Your rules.
Create and submit Mods (such as Maps, New Subsystems, Scenarios, and even Total Conversions) for others to download and play with Star Ruler 2's seamless workshop integration.
Learn More
Horlan 1 1 May, 2016 @ 4:10am
Hooks? How? Where? Which?
I want to write a script that automates a few things for me.

What hooks can I use if I want to run my check every Minute? Or 10 seconds before the end of a Budget cycle?

Also what is a good way to create options for such a script? Probably adding a custom sidebar popout?

I would appreciate any help :)

I tried looking through the definitions/*hook.as files but couldn't make much sense of it yet.
Last edited by Horlan; 1 May, 2016 @ 4:12am
< >
Showing 1-5 of 5 comments
Dalo Lorn 23 1 May, 2016 @ 4:11am 
Uhh... this doesn't involve hooks, and I can't say much more without knowing what you want to do...
Horlan 1 1 May, 2016 @ 4:16am 
Basically a way to run my Function either on occuring events (Planet level change, new planet colonized, before a budget cycle ends) and/or in fixed intervals.

The end goal is to automate building of population to the pop cap as mecha race but thats not the issue.

Currently I run the function via console command but that is really just a crude workaround for the moment.
Dalo Lorn 23 1 May, 2016 @ 4:38am 
I'm... stumped. Pretty much stumped, sorry.
Horlan 1 1 May, 2016 @ 4:57am 
No Problem I will figure it out eventually :D

Most classes seem to use a tick function that gets called from time to time. Not sure how it determines if a classes tick function gets called though.
Horlan 1 1 May, 2016 @ 5:52am 
I think I figured out the rough details. Every Mechanic Planet gains a special status. I can add an ability to that planet where the ability marks a planet to produce population.

Then I can have the ability call my Function in intervals.
< >
Showing 1-5 of 5 comments
Per page: 1530 50