Author Topic: Tuprime value Hardcoded?  (Read 3091 times)

Offline Eagleclaws17

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Tuprime value Hardcoded?
« on: November 03, 2020, 12:16:30 am »
While editing or making a custom version of grenades I encountered an issue when it comes to Priming and Throwing. Even tho I can set the Values for tuPrime and tuThrow and if its a Flatrate in the Rulesets without issues it would not be accepted in Game, it looks like priming and throwing seems to be Hardcoded at 50% for Priming and 25% for throwing for everything that has the Battletype 4 and 5 in the Ruleset. So im wondering if there is something im missing since I didnt found something in other threads or the Ufopedia wiki

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Tuprime value Hardcoded?
« Reply #1 on: November 03, 2020, 12:44:19 am »
Are you using this mod in OpenXcom Extended (OXCE) or OpenXcom (OXC)? The ruleset values tuPrime and tuUnprime are only used if your mod is running on OXCE. This is true for all of the values in the ruleset reference on ufopaedia.org that are highlighted in green.

Offline Eagleclaws17

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: Tuprime value Hardcoded?
« Reply #2 on: November 03, 2020, 12:49:50 am »
Are you using this mod in OpenXcom Extended (OXCE) or OpenXcom (OXC)? The ruleset values tuPrime and tuUnprime are only used if your mod is running on OXCE. This is true for all of the values in the ruleset reference on ufopaedia.org that are highlighted in green.
Yes I am using OXCE 6.6.1, and I know about the green marked lines in the references, I am playing Xcom and not TFTD tho

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Tuprime value Hardcoded?
« Reply #3 on: November 03, 2020, 03:41:32 am »
UFO vs. TFTD shouldn't matter, they use the exact same code to load mods. Where are you editing these values? If they're in a mod you made, did you activate the mod through the Mods menu? Until you give more details about what you're doing, you're not going to get much help.

It's definitely not hardcoded, I just tested a mod with the following code and it properly set the priming cost for the grenade:

Code: [Select]
items:
  - type: STR_GRENADE
    tuPrime: 1

Offline Eagleclaws17

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: Tuprime value Hardcoded?
« Reply #4 on: November 03, 2020, 12:11:12 pm »
Well here are the things ive tried so far:
I tried to add the Values to default Openxcom item rulesets, I tried it with the Final Mod Pack rulesets, and I tried it with a mod that is a custom version of the default Handgrenade, however I still always get the default 50% tu and 25% tu for priming/throwing. But I am using OXCE tho, I can even use other ruleset values exclusive for OXCE like Craft shields, armor and also the flat- modifiers for Items, except every Item that has the Battletype 4-5

Offline Eagleclaws17

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: Tuprime value Hardcoded?
« Reply #5 on: November 03, 2020, 12:17:18 pm »
I also tried it without any mods installed, this below is an Example of how my Ruleset for the Grenade looks like
« Last Edit: November 03, 2020, 12:45:12 pm by Eagleclaws17 »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Tuprime value Hardcoded?
« Reply #6 on: November 03, 2020, 12:32:08 pm »
That ruleset file doesn't do anything.

You're missing "items:" header.

Offline Eagleclaws17

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: Tuprime value Hardcoded?
« Reply #7 on: November 03, 2020, 12:44:19 pm »
That ruleset file doesn't do anything.

You're missing "items:" header.
Oh yeah I forgot that haha
It was just an example of how my ruleset looks like, I update it tho

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Tuprime value Hardcoded?
« Reply #8 on: November 03, 2020, 01:19:57 pm »
does it work now?

Offline Eagleclaws17

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: Tuprime value Hardcoded?
« Reply #9 on: November 03, 2020, 01:53:02 pm »
does it work now?
It does Partially, the tuThrow value is now changed to its percentage amount, but after adding "flatRate: true" it still uses a percentage amount of time units, and the tuPrime value ingame remains unchanged (still vanilla)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Tuprime value Hardcoded?
« Reply #10 on: November 03, 2020, 02:33:42 pm »
Can you upload the entire mod please?

Offline Eagleclaws17

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: Tuprime value Hardcoded?
« Reply #11 on: November 03, 2020, 09:32:48 pm »
Can you upload the entire mod please?
Sry for the Late reply, a clean reinstall of OXCE fixed it actually, I had no internet for a few hours and this issue ontop startled me a bit. From what I could see it seems I had some sort of OXC/OXCE hybrid thanks to me beeing unexperienced, that would also explain the one or other Bug I had haha.