Author Topic: Old OXCE+ discussion thread  (Read 234765 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1228
    • View Profile
Re: [OXCE+] Original discussion thread
« Reply #1695 on: September 08, 2018, 08:23:57 pm »
I moved check for correct research because game waste lot of time to check every time if research exists. Another this was that you need run game and do lot of things to check if all your rules are correct and reference correctly each other.
Because of this I stared adding code that link all data after all mods are loaded, thanks to that game code is simpler and modder can start game only to verify if his mod is defined correctly.

Thank you.

I think it's great if the game is willing to go to all that trouble because it can help the modder discover errors, as long as it doesn't have to waste time checking. Or if it were a separate tool that the modder could use electively, then you could make it as thorough as you want.

But if a code error doesn't necessarily cause problems, then I think in most cases it's best to make the game allow it. You never know when someone will intentionally use the code error for their mod. Sometimes it ends up being a feature after all.

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2094
    • View Profile
Re: [OXCE+] Original discussion thread
« Reply #1696 on: September 08, 2018, 09:16:39 pm »
Thank you.

I think it's great if the game is willing to go to all that trouble because it can help the modder discover errors, as long as it doesn't have to waste time checking. Or if it were a separate tool that the modder could use electively, then you could make it as thorough as you want.

But if a code error doesn't necessarily cause problems, then I think in most cases it's best to make the game allow it. You never know when someone will intentionally use the code error for their mod. Sometimes it ends up being a feature after all.
First of all why I did is was to simplify engine (and speed it up). Check for modders was a free bonus.
Old version us text to find references when needed (and doing this need look through every object of that type). Now one object have direct access to another (in some extreme cases it could be 1000 times faster) and because of that I can't disable "checks" it only thing I can is throw error or ignore completely that both will not work in your case.

Overall doing things like this is not wise because you really on things that are not expected by programmers and not supported. This worked only because it was "passive" list, when it become active (like I did) your mod will stop working. Other times its bug that will be fix in next version. In C++ something like that is named Undefined Behavior :>

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5060
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [OXCE+] Original discussion thread
« Reply #1697 on: September 08, 2018, 09:34:39 pm »
Yeah, don't hack... ask for a feature instead.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1228
    • View Profile
Re: [OXCE+] Original discussion thread
« Reply #1698 on: September 09, 2018, 11:53:40 pm »
Yeah, don't hack... ask for a feature instead.

It doesn't seem like hacking to me. I don't see why I should be forced to make research projects for everything that requires one. If the player never encounters the research project, they simply are never able to use the item.

If it were a case of A calls for B then it would be problematic because once A were called, B would fail and the game would crash. But it's not. It's a case of A needs B. Since A never has B, A is permanently off. That's not hacking, it's basic programming.

To give another example:
If you have a suit of armor that exists only to make a UFOPedia article, it might not have a spritesheet that corresponds to it, and it also does not call one. If you tried to wear the armor onto the battlefield, it would attempt to call a spritesheet and fail, and the game would crash. But if you never wear it (because it's not available to the player) then it only ever has its inventory sprite called. Thus it's fine if the armor has no spritesheet as long as it doesn't call for one.

Now say you have an armor suit that has a spritesheet listed, but it doesn't link to anything in extraSprites, or the file isn't found. That would be a case where the game should alert the player to it at start, because the armor is already calling the spritesheet and failing to find it.


You COULD make all armors require a spritesheet, inventory sprite, and a corpse, but then you'd break every mod that has unusable armors that don't have those.

- - - - -
So, can I have a way to make alien artifacts yield points on recovery even if they have been researched?
« Last Edit: September 10, 2018, 12:01:32 am by The Reaver of Darkness »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5060
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [OXCE+] Original discussion thread
« Reply #1699 on: September 10, 2018, 12:03:32 am »
I don't know if you're a programmer... but that's far from basic programming.
In best case, it's neglecting of proper checking of user input.
In worst case, blatant disrespect for common sense.

Yes, you can have such option... do you want this also in the real game or only in the "New Battle" mode?

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1228
    • View Profile
Re: [OXCE+] Original discussion thread
« Reply #1700 on: September 10, 2018, 12:15:19 am »
do you want this also in the real game or only in the "New Battle" mode?
Both, most importantly in the main game. But I do want the ability to deliver the "New Battle" experience the way I want others to receive it. I don't like not being able to enforce something in that mode just because of its default settings.

P.S.: I am not a programmer.

Offline DaveQB

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Re: [OXCE+] Original discussion thread
« Reply #1701 on: September 14, 2018, 10:25:59 am »
Just registered to say my thanks for the Android version. I tried an older version long ago but my phone wasn't much back then, and now that I got a new one and a stylus I couldn't but check again - I was confused at first because I didn't even know that OpenXcom website had changed domain a while ago. Great to see a new mod portal, too.

What I find most impressive, as the result of all the years of cumulative work since the first OXC release, is that all the improvements (like the indicators of how many Time Units will be left after moving to a certain tile) are so well integrated, they feel like they were always there.

I'd love to see a feature that allows to scale the Battlescape and the UI differently but, from a quick search, the idea has been considered loooong ago already but it was stated as very difficult to implement.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5060
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: Old OXCE+ discussion thread
« Reply #1702 on: September 17, 2018, 05:30:16 pm »
This thread has been locked, please use the new thread: https://openxcom.org/forum/index.php/topic,6586.0.html