Any mods that make territory control meaningful?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Any mods that make territory control meaningful?

Post by BlackRain » Wed, 14. Apr 21, 23:32

Midnitewolf wrote:
Wed, 14. Apr 21, 23:22
BlackRain wrote:
Wed, 14. Apr 21, 22:36
chip56 wrote:
Tue, 13. Apr 21, 08:55
No Rep Malus if you destroy a ship that fired on you first. After all that means those ships are actually criminals in this case.
The option to enforce peace or at the very least attack those that broke the peace without suffering any REP penalties.
We need to come up with things which are possible. It is not possible to get rid of rep loss from attacking ships as far as I know. Same for your second suggestion.
Well that depends on your definition of possible. The Devs absolutely could do all these things, it is just a matter of adding in the necessary programing and if you really want to get down to it, actually being able to actually "Control" or "Enforce" what happens in your own sectors would go a long way to making territory control meaningful.

However, possible isn't always easy so some possible easy solution to what chip56 asks for would be things like a simple "neutral" tag that you can place on your sectors. Then any one attacking another ship in your territory get immediately tagged as hostile. Also to make things more dynamic just tie the frequency of other factions ships ignoring your "neutrality" be based on your reputation with that faction. Something like this.

Faction Level
25+ = 5% chance of faction ignoring your neutrality
20-24 = 10% chance of faction ignoring your neutrality
10-19 = 15%
5-9 = 20%
1-4 = 50%
0 or lower - Don't give a rats putidy about your neutrality.

Relationship loss for attack an NPC ship isn't touched at all in this possible solution. All that happens is that factions who like you will tend to be more peaceful but you would still have to choice to ignore violations of your neutrality or lose faction dealing with them.

I am not a programmer but I would think the logic would be pretty easy to implement. Something like that.

Set Sector neutrality = 1 or 0 (yes or no)

Then Faction A ship encounters Faction B ship a simple check occurs. Ship A calls queries the sector to see if Sector Neutrality is set to 1 or 0. If 0 if attacks as per normal. If set to 1 a query is sent to Table A to determine if encountered ship B is "attackable". Table A contains several 1 or 0 responses based on relationship with the sectors controlling faction. Relationship check happens. RNG check happens based on the probabilities contained in Table this results in a 1 or 0 response, 1 triggers the attack, 0 triggers don't attack. Both trigger timer that resets Ship A or B's ability to possibly attack each other again if they encounter each other again say 5 minutes later.

Adding this should be some easy programing. However, the only concern I would have it how much more workload this on AI calculations. The overhead might be too high considering the sheer amount of ships that would potentially be doing these calculations. However if this was limited to player owned sectors only, that should minimize the impact. Another way to limit the impact would be to perhaps have this script only function within say 20 km of a player owned station. I mean space is vast and even if you technically could control thousands of cubic km of space, there are bound to be nefarious things happening out of site. Having a 20 km zone around player controlled stations would probably reduce the number of ships having to make these calculations to less than a few hundred tops and probably more like 40-50 in most cases.

Anyway, is it entirely possible to do something like this I am sure, however it is just a matter if the devs would feel it worth the time to add, troubleshoot, test and implement especially since I am not sure how you would go about calculating the overhead cost without actually adding in the code to test it in the first place.
I don't think you understand what I was saying. It is not possible through modding as far as I know. I guess you could have a script which checks for ships fighting and then make them hostile, etc. but this is a lot of work and and more scripts running constantly. Well, I don't plan on doing anything so complex.

chip56
Posts: 500
Joined: Mon, 13. Apr 20, 21:52

Re: Any mods that make territory control meaningful?

Post by chip56 » Thu, 15. Apr 21, 08:36

Wouldnt it be possible to check if its your sector and make a ship a criminal if its rep hits -20?
If they are fighting you get the temp rep malus already so it would be low rep.

Only issues i can think of right now with that approach would be that it could be abusable (you attack first and they turn hostile and thus criminal) and that if you have any missions to kill x ships of a faction it would not count.

Post Reply

Return to “X4: Foundations - Scripts and Modding”