aliens

Author Topic: OXCE (OpenXcom Extended) main thread  (Read 445876 times)

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3194
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #270 on: August 10, 2019, 01:37:33 pm »
If you want some rule set have common part there is already tool for that: `refNode`

This allow you to define somewhere in yaml file some common part and then reuse it in other places:

Code: [Select]
items:
   - &STR_LASER_RIFLE           # Let's mark laser rifle info with an anchor
     type: STR_LASER_RIFLE
     size: 0.2
     costSell: 36900
     weight: 8
 #
 # a million other attributes...
 #
   - type: STR_LASER_SNIPER_RIFLE
     refNode: *STR_LASER_RIFLE  # First, let's inherit everything from the STR_LASER_RIFLE anchor.
     bigSprite: xxx             # And now let's give it a new sprite,
     accuracyAimed: 160         # increase aimed shot accuracy
     tuAuto: 0                  # and disable auto shot.

This is example from beginning of https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#

In your case you could do:
Code: [Select]
dummySoldiers:
   - &STR_SOLDIER_REF
    [all common stats...]

soldiers:
  - type: STR_CUSTOM_SOLDIER
    refNode: *STR_SOLDIER_REF
    [all custom stats...]

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #271 on: August 10, 2019, 01:50:02 pm »
If you want some rule set have common part there is already tool for that: `refNode`
Yeah, i know abour refNode, but as far as i can tell it doesn't work across different ruleset (and by extension across mods), and it can't be used as a placeholder in lists (unless i am mistaken).

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3194
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #272 on: August 10, 2019, 02:17:21 pm »
This is true, this work because it depend on yaml node references. To have some more then we would need rewrite all code responsible for loading rulesets, possible but will take lot of time to do. This could complicate and slow down loading code if done incorrectly.

If lot of modders have same problem case like you then it worth fix in code. If only few then we only transferring work to others and this is ineffectual because there is more modders than programmers (only Meridain is working on OXCE "full" time).

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #273 on: August 10, 2019, 02:34:08 pm »
This is true, this work because it depend on yaml node references. To have some more then we would need rewrite all code responsible for loading rulesets, possible but will take lot of time to do. This could complicate and slow down loading code if done incorrectly.

If lot of modders have same problem case like you then it worth fix in code. If only few then we only transferring work to others and this is ineffectual because there is more modders than programmers (only Meridain is working on OXCE "full" time).
Yeah, i had a look at the YAML documentation beforehand and wasn't able to find anything along the lines of what i was looking for. I doubt that many others would have a need for this, seeing how this is basically for a submod.

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8597
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #275 on: August 11, 2019, 10:44:30 pm »
Thanks for new version !
But big pb !  :-[

v5.6.1
TFTD

Nota ;
C:\_GAMES\OpenXcom_Ex\standard\xcom2\Resources\UI\globe_tftd.png   exist !
902 octets - 27x3

New Game... create first base... named first base... ok... Boom !

Found the issue.
Fixed.
Download new version at the usual place.

Offline BlackStaff

  • Colonel
  • ****
  • Posts: 336
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #276 on: August 12, 2019, 03:25:35 pm »
Found the issue.
Fixed.
Download new version at the usual place.
Thank you very much !

Offline mercy

  • Colonel
  • ****
  • Posts: 338
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #277 on: August 12, 2019, 09:43:05 pm »
Reverse the Throw Grenade vs.  Unprime grenade menu order?

Its very un-intuitive and counterproductive the current way. I want it the intuitive, natural  way:

Throw Grenade
Unprime grenade

Naturally in combat I want to throw the FRIGGIN' grenade really fast and I do NOT wish to FCKN BUMP into its deactivate menu.. right? 
Was it a Microsoft Engineer who coded this like placing the START button right beside the SHUTDOWN   so the computer can be shut down accidentally??? 
« Last Edit: August 12, 2019, 09:45:23 pm by mercy »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8597
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #278 on: August 12, 2019, 10:13:32 pm »
I completely agree.
Whenever modders enable the unprime option, I disable it locally... it's easy, you can do it yourself.
Who would ever need to unprime a grenade, right?

Offline mercy

  • Colonel
  • ****
  • Posts: 338
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #279 on: August 12, 2019, 10:51:25 pm »
I completely agree.
Whenever modders enable the unprime option, I disable it locally... it's easy, you can do it yourself.
Who would ever need to unprime a grenade, right?
Good! How to disable this option?
I scoured the files for the string "unprime", but only found it in the yml and by every grenade.  There must be a central switch for this "feature" to be erased from existence?

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8597
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #280 on: August 12, 2019, 10:58:28 pm »
Good! How to disable this option?
I scoured the files for the string "unprime", but only found it in the yml and by every grenade.  There must be a central switch for this "feature" to be erased from existence?

Search and replace, takes a second.

Offline mercy

  • Colonel
  • ****
  • Posts: 338
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #281 on: August 12, 2019, 11:14:51 pm »
Search and replace, takes a second.

The order of the two menu items is defined somewhere specifically? 
Or you mean, just go to
items_XCOMFILES.rul
and delete all
    unprimeActionName: STR_UNPRIME_GRENADE

?

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8597
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #282 on: August 12, 2019, 11:18:14 pm »
I mean just delete
or replace with unprimeActionName: ""
or replace with #unprimeActionName: STR_UNPRIME_GRENADE
or replace with notWorking: STR_UNPRIME_GRENADE

or whatever kind of disable you prefer :)

Offline BlackStaff

  • Colonel
  • ****
  • Posts: 336
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #283 on: August 12, 2019, 11:44:01 pm »
Personally I like to have both (prime/unprime) for each grenade and explosive.  :)
I use it... sometimes.
So I went through the "items" file and added the missing lines.  ;)
Everyone has their own preferences!  8)

Offline mercy

  • Colonel
  • ****
  • Posts: 338
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #284 on: August 12, 2019, 11:56:30 pm »
I mean just delete
or replace with unprimeActionName: ""
or replace with #unprimeActionName: STR_UNPRIME_GRENADE
or replace with notWorking: STR_UNPRIME_GRENADE

or whatever kind of disable you prefer :)

Thank You! You made my grenadiers very happy!