Never modded a game before, but as a computer science student with a few programming classes under my belt I thought it would be fun, and not too challenging, to set up a mod that adds a handful of events to the game. This seems like it should be easy to simply add a few text pop ups and modifiers depending on which option the player selects in response.
I'm not really sure how to get started though, and my searching for any kind of API documentation or guides to adding events, but coming up pretty short. I've looked through the stellaris/events and common/anomalies text files, and I have a basic grasp on the syntax and how things should look, but for example:
In this vanilla event
### Asteroid Fossils
ship_event = {
id = anomaly.15
title = "anomaly.15.name"
desc = "anomaly.15.desc"
picture = GFX_evt_mining_station
show_sound = event_ship_bridge
location = FROM
is_triggered_only = yes
option = {
name = FASCINATING
owner = {
add_monthly_resource_mult = {
resource = society_research
value = @tier1researchreward
min = @tier1researchmin
max = @tier1researchmax
}
}
}
}
It looks pretty clear that the id, title, and desc are calling a method in a different class somewhere, but I can't seem to see where it is or what methods the class contains that I can work with. So is there any official documentation I can look into to see more information? is there just a well written guide on how to events I can see? any help would be appreciated.
I'm not really sure how to get started though, and my searching for any kind of API documentation or guides to adding events, but coming up pretty short. I've looked through the stellaris/events and common/anomalies text files, and I have a basic grasp on the syntax and how things should look, but for example:
In this vanilla event
### Asteroid Fossils
ship_event = {
id = anomaly.15
title = "anomaly.15.name"
desc = "anomaly.15.desc"
picture = GFX_evt_mining_station
show_sound = event_ship_bridge
location = FROM
is_triggered_only = yes
option = {
name = FASCINATING
owner = {
add_monthly_resource_mult = {
resource = society_research
value = @tier1researchreward
min = @tier1researchmin
max = @tier1researchmax
}
}
}
}
It looks pretty clear that the id, title, and desc are calling a method in a different class somewhere, but I can't seem to see where it is or what methods the class contains that I can work with. So is there any official documentation I can look into to see more information? is there just a well written guide on how to events I can see? any help would be appreciated.