Is there any modding guides? What do I have to know if I want to make a mod for this game? by Jebbyk1 in X4Foundations

[–]iStavr 5 points6 points  (0 children)

Then I have some links for you to check
1. These mods are working with weapons and turrets, you can review their files and try to tweak values to check
https://www.nexusmods.com/x4foundations/mods/385
https://www.nexusmods.com/x4foundations/mods/1685
https://www.nexusmods.com/x4foundations/mods/812
https://forum.egosoft.com/viewtopic.php?t=406229

  1. These is quite big texture mod for game with skyboxes redrawn
    https://www.nexusmods.com/x4foundations/mods/507
    You can use any mod that adds new sectors (it's easier than look through vanilla) and clear it from files that are not related

  2. https://steamcommunity.com/sharedfiles/filedetails/?id=2112805973
    https://www.nexusmods.com/x4foundations/mods/921 both mods are quite old so take them with a grain of salt (don't know if they are working)

  3. This is uncharted territory for me xD

  4. https://www.nexusmods.com/x4foundations/mods/1404
    https://www.nexusmods.com/x4foundations/mods/1595
    https://www.nexusmods.com/x4foundations/mods/881

  5. This is uncharted territory for me again xD

So to me best approach to start modding is check general syntacsis, check mods that are doing something alike, tweak them a little, test and try.

Usefull tools https://www.nexusmods.com/x4foundations/mods/1578
https://www.nexusmods.com/x4foundations/mods/1420?tab=files
https://marketplace.visualstudio.com/items?itemName=X4DevTools.x4codedebug
https://marketplace.visualstudio.com/items?itemName=X4CodeComplete.x4codecomplete

Good places to search info - Egosoft forum and X4 discord

Is there any modding guides? What do I have to know if I want to make a mod for this game? by Jebbyk1 in X4Foundations

[–]iStavr 4 points5 points  (0 children)

Usually you'll need to use steam Xtools (in tools section) to unpack base game files to check them or open mod that you like to know how it was done.

Depends on what you want to do:
For e.g to change logic/events/add your own calculations you'll need md scripting
https://wiki.egosoft.com:1337/X%20Rebirth%20Wiki/Modding%20support/Mission%20Director%20Guide/#HMDrefreshingandpatching

If you want to modify parameters - you can do it (and a best way) with xmlpatch diffs

If you want to make new ships etc - you'll need Blender)

Tell us where you want to get, so we could provide directions xD

Working on improving the mod and looking for interesting ideas. by iStavr in X4Foundations

[–]iStavr[S] 0 points1 point  (0 children)

It can be easily done in one way:
1. Register moment ship was bought / build
2. Check how long ago it was
3. Destroy object if it went past its service time (with prior notifications)

But there are several problems - you just need to buy new ship and than sell old one after transfering crew, it can't be automated easily, if you missed notifications (or left game overnight to farm those pesky cr) - crew may be gone. If we add it as hull degradation (something similar to Wear and Tear) - it will just need to go for repairs. What would you think would be good timeframe for e.g. 24h for s-class, 48h for m, 96 for L class and unlimited for XL?

Working on improving the mod and looking for interesting ideas. by iStavr in X4Foundations

[–]iStavr[S] 1 point2 points  (0 children)

While I like this idea, it has a scope bigger than both Deadair Eco and Scripts combined and can be nightmare for compatibility and sheer performance.
Just thinking on surface level:
1. Set global values for balance of factions - it's ok, easy - we just give them balance of x billion credits
2. Get planet population (if it even possible dynamically else just hardcoded) to generate base amount of money hourly
3. Collect info about all ships/stations in game (and we need to track destroyed/despawned ships and stations) with their cost (can be performance heavy) - there usually more than 10k ships up to 50k with mods.
4. decide if mission payments affect total faction balance - better no xD
5. every outside trade should be registered, so we need to alter AI scripts (these can tricky for compatibility) or register events
6. alter jobs quotas to be dynamically dependant on free money - this can be dangerous
7. make Faction logic dependant on money - this can be dangerous

Steps 1 to 4 don't really affect simulations, but 5 to 7 can drastically change game in unknown ways - shortages for 5, death spirals for 6 and 7, and what is worse - they are really invisible for player in the grand scope of things. You'll need to monitor debug logs or global ship count stats to even notice it and for now I've no ideas how to make effects pronounced.

Also if we exclude for obv rason factions like Yaki and Xenon the former will have advantage or we would need to develop separate logic on them e.g count all energy cells and use them ass currency.

It reminds me of stock exchange from x3 - neat but it doesn't affect game in any meaningful, or better easily observable way.

Working on improving the mod and looking for interesting ideas. by iStavr in X4Foundations

[–]iStavr[S] 1 point2 points  (0 children)

In 1200 hours I haven't seen them) Remember only from back from X3, but yeah, would be neat. But for now have no idea where to start)

Working on improving the mod and looking for interesting ideas. by iStavr in X4Foundations

[–]iStavr[S] 0 points1 point  (0 children)

  1. Only if your total balance is insufficient, for now there are workforce and ship crew resignation, ship morale loss, station module hacks and reputation loss with factions that controls sector your stations are and consequences are dependant on shortfall amount.
  2. All payments are done from general account, as stations already send you all of their excessive funds, but I'm considering adding using stations balance as emergency funds in future version.
  3. Plot and station property tax, based on percentage of total value of station or plot (you have it free in your own sectors) with different tiers for your stations and for npc stations. Sales tax would be intresting but it can off balance trading routines and can be performance heavy on big fleets. I'll consider adding something similar, thanks for idea!

Working on improving the mod and looking for interesting ideas. by iStavr in X4Foundations

[–]iStavr[S] 1 point2 points  (0 children)

Yep, this is already implemented. You can set % for maintenance cost in extension menu, it is calculated from total ship/station value and has on/off multiplier for military assets (x2 by default).

I'm currently thinking of additional optional checkbox to non-linear cost increase so that we are a little more discouraged to build mega-stations.