31
Modding / Re: Can someone make a mod to remove arms dealers
« on: May 15, 2023, 02:27:09 AM »
1. The way I'd do it is via `BaseCampaignEventListener::reportPlayerEngagement()` to adjust rep post combat, and various `ColonyPlayerHostileActListener`to adjust rep post various raids. You can steal code from Starpocalypse.
This code adjust rep by small amount based on how much each other hate or like (e.g. you beat Pirates, and Hegemony hates Pirates thus Hegemony now likes you slightly more): https://github.com/jaghaimo/starpocalypse/blob/master/src/starpocalypse/reputation/EngagementListener.java
This code makes you at war with a faction if you raid for defined special items from their market (doesn't matter if you take it): https://github.com/jaghaimo/starpocalypse/blob/master/src/starpocalypse/reputation/RaidListener.java
Your mod would thus combine the two approaches, and, for any action against Indies, for any faction that likes Indies, lower that faction's reputation with you.
A much better option would be to go through `rules.csv` (more work/advanced) as that would let you show the consequences of your actions inside interaction dialogues which are part of the action itself (combat / raid) with nice flavour text, e.g. ("Your recent hostile action against Independents has angered Hegemony, Sindrian Dictat, and The Tri-Tachyon (reputation lowered by 5)".
Either way it's a fairly simple mod, pop on the Discord and people will surely help you.
2. These are all used in code, fetched by group and id. Their mapping (group, id to file) is done in `data/config/settings.json` - look for `graphics` section, you want `characters` and `intel` (historian et al.).
This code adjust rep by small amount based on how much each other hate or like (e.g. you beat Pirates, and Hegemony hates Pirates thus Hegemony now likes you slightly more): https://github.com/jaghaimo/starpocalypse/blob/master/src/starpocalypse/reputation/EngagementListener.java
This code makes you at war with a faction if you raid for defined special items from their market (doesn't matter if you take it): https://github.com/jaghaimo/starpocalypse/blob/master/src/starpocalypse/reputation/RaidListener.java
Your mod would thus combine the two approaches, and, for any action against Indies, for any faction that likes Indies, lower that faction's reputation with you.
A much better option would be to go through `rules.csv` (more work/advanced) as that would let you show the consequences of your actions inside interaction dialogues which are part of the action itself (combat / raid) with nice flavour text, e.g. ("Your recent hostile action against Independents has angered Hegemony, Sindrian Dictat, and The Tri-Tachyon (reputation lowered by 5)".
Either way it's a fairly simple mod, pop on the Discord and people will surely help you.
2. These are all used in code, fetched by group and id. Their mapping (group, id to file) is done in `data/config/settings.json` - look for `graphics` section, you want `characters` and `intel` (historian et al.).