Author Topic: [Solved] Give me tips to keep my mod OXC compatible  (Read 4327 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
[Solved] Give me tips to keep my mod OXC compatible
« on: December 27, 2017, 10:12:48 pm »
I've been working on my mod in OXC for a long time now and I finally decided to dive into OXCE+, but I want to at first make sure any changes I make are compatible with OXC, so that the mod not only loads, but remains well balanced, if played in OXC. I'm also new to OXCE+ and I don't know any coding, so every step I'm just copying other people's code. Please show me how to make things happen, and don't spare the gritty details.


I've been told I can avoid compatibility problems by not changing values to things that only work in OXCE+, and instead circumvent it by using a line that only OXCE+ will parse. Example: using damageAlter instead of giving damageType an above 9 value.

I found and bookmarked the ruleset reference.



I'll start with a few of the things I want to add to my mod using OXCE+ features:
1.) Giving some craft 3 or 4 weapons. I've seen that this was done before, however the ruleset reference (RR) says that the UI can only display 2. There's room for 4 without major changes, just by sliding stuff around a bit. How do I make this work at all? And can I do it such that a craft can have different weapon settings for OXC and OXCE+? Can I also give it other differences such as damageMax or refuelRate? Some of my OXC craft have tentatively boosted attributes to make up for the weapons they don't have.

2.) Making medi-kit heal more than 1 fatal wound. I want to make this happen without it causing the soldier to get into negative fatal wounds and heal every turn past their max health. Can I do this in OXCE+? I can't seem to do it in OXC.

As I'm looking at the OXCE+ ruleset reference, I can't help but think it looks exactly like the OXC ruleset reference. Where are all the new commands I can put in?

- - - - - - - - - - - - - - - - - - - -
Here I plan to update the post with solutions, tips, and ideas.

Craft Weapons: OXCE+ makes increasing craft weapons easy. Just give the craft a higher weapon count. If you load it in OXC, it will only fit up to 2 weapons.

Medikit bug tested: not present in OXCE+.
« Last Edit: February 11, 2023, 04:34:22 pm by Meridian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9086
    • View Profile
Re: Give me tips to keep my mod OXC compatible
« Reply #1 on: December 27, 2017, 10:33:59 pm »
The ruleset reference on ufopedia is just a futile effort, nobody is maintaining it... I would prefer if it was deleted.

There are 3 realistic sources for OXCE+ ruleset description:
1. changelog with links to more details: first 3 posts in this thread: https://openxcom.org/forum/index.php/topic,4187.0.html
2. full text search on the forum
3. reverse-engineer from other mods (for example X-PirateZ is using more than 90% of the new ruleset... it's a good place to look for samples)

For OXCE ruleset, all or most of it should be summarized here: https://github.com/Yankes/OpenXcom/blob/OpenXcomExtended/Extended.txt

PS: I understand everyone wants (at least initially) to keep things "backwards-compatible"... but there's no real reason to do so... it will just be more work for you for no real benefit. Consider if you need OXCE+ or not.... and if you decide you need the new features, just ask players to use it with OXCE+ instead of OXC (or even distribute it together with OXCE+). Win-win. So far this model works fine, and nobody is complaining.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Give me tips to keep my mod OXC compatible
« Reply #2 on: December 28, 2017, 01:48:42 am »
I'll start with a few of the things I want to add to my mod using OXCE+ features:
1.) Giving some craft 3 or 4 weapons. I've seen that this was done before, however the ruleset reference (RR) says that the UI can only display 2. There's room for 4 without major changes, just by sliding stuff around a bit. How do I make this work at all? And can I do it such that a craft can have different weapon settings for OXC and OXCE+? Can I also give it other differences such as damageMax or refuelRate? Some of my OXC craft have tentatively boosted attributes to make up for the weapons they don't have.
What rule reference? I probably fix all UI that display weapons to show every weapon (of 4). And weapon setting need be same for OXC and OXCE because they are shared.

2.) Making medi-kit heal more than 1 fatal wound. I want to make this happen without it causing the soldier to get into negative fatal wounds and heal every turn past their max health. Can I do this in OXCE+? I can't seem to do it in OXC.
This was fixed in OXCE before OXC fix it.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Give me tips to keep my mod OXC compatible
« Reply #3 on: December 28, 2017, 11:10:57 am »
The ruleset reference on ufopedia is just a futile effort, nobody is maintaining it... I would prefer if it was deleted.

It's off-topic, but I think the ruleset reference article is a new modder's only hope. I've done some work on it and I think the article would probably be fine if we didn't have problems with logging in to Ufopaedia... It works for me now (just checked), but it unreliable.
I will try to focus on that article a bit more, maybe find ways to update it.

And back on topic, I am 100% in agreement with Meridian's opinion. If you are using OXCE+ in the first place, you'll probably never want to run the mod on vanilla OXC. And you want to keep it balanced for both versions, too? How on Earth are you planning to do so? If you want to use OXCE+ features to for example give a weapon additional effects (like for example damageAlter), then they simply won't work in vanilla and the weapon will effectively have a completely different balance.
« Last Edit: December 28, 2017, 11:13:52 am by Solarius Scorch »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9086
    • View Profile
Re: Give me tips to keep my mod OXC compatible
« Reply #4 on: December 28, 2017, 11:20:37 am »
Another issue with it is that any changes and additions to vanilla ruleset are not updated... if this form is preferred, maybe we can talk to SupSuper about adding OXCE/OXCE+ ruleset to main article, in different color or something...

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Give me tips to keep my mod OXC compatible
« Reply #5 on: December 28, 2017, 11:18:08 pm »
As lazy person I would prefer auto generated rulesets examples :)
But because Im lazy I do not have time to implements something like this.