Author Topic: Two questions.  (Read 5543 times)

Offline Snowfield

  • Sergeant
  • **
  • Posts: 11
    • View Profile
Two questions.
« on: January 06, 2018, 03:03:03 am »
Hey, folks. I couldn't dig up an answer for these on my own, which leads me to believe they're not possible:

1. Is there any way in either the base ruleset or in OXCE(+) to define a unit's rate of energy consumption when moving, as per offset 45 in UNITREF.DAT?

2. Is there a way to make undeveloped squares in a base defense use a map block that isn't solid dirt, if one wished to represent above-ground bases?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Two questions.
« Reply #1 on: January 06, 2018, 03:28:53 am »
I don't know about the first question, but I wrote the OXCE+ code to do exactly the second.  See here for a reference.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Two questions.
« Reply #2 on: January 06, 2018, 03:56:03 am »
1: no. energy consumption is a factor of time unit consumption. you CAN however enable 'alternate movement methods' to allow sprinting, which burns less time units and more energy to move.
2: yes. mapscripts can easily FillArea with an array of mapblocks rather than simply using dirt.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Two questions.
« Reply #3 on: January 06, 2018, 06:42:16 pm »
While energy consumption is constant, in OXCE+ (I think only there) you can modify energy regeneration. Of course it's a bit different and I'm not sure if it meets your needs, but you might want to know about it.

Offline Snowfield

  • Sergeant
  • **
  • Posts: 11
    • View Profile
Re: Two questions.
« Reply #4 on: January 10, 2018, 11:12:06 am »
Thanks for the help, fellas. I've got more questions I couldn't pin down the answers to.

1. Is there a way to add LOFtemps via ruleset?

2. From what I can see, sight and shot height are magicnumbered at 1 and 4 voxels respectively below the topmost of the unit; is this so?

3. What do createsMeleeThreat and ignoresMeleeThreat (OXCE+) do, exactly? My inference is that they're just flags to help the AI of whether a unit is capable of conducting, or is at risk of, melee attacks, but I couldn't find the original post to confirm.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Two questions.
« Reply #5 on: January 10, 2018, 02:59:52 pm »
The melee threat tags are an extension of the close quarters combat feature, defining whether or not a unit can cause another to undergo the CQC check when firing (createsMeleeThreat) and whether the unit can ignore CQC checks (ignoresMeleeThreat).

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Two questions.
« Reply #6 on: January 10, 2018, 08:32:05 pm »
1. Is there a way to add LOFtemps via ruleset?

No. It might be possible to edit the LOFTemps file to add additional shapes, but to my knowledge no one has ever tried it

Offline Snowfield

  • Sergeant
  • **
  • Posts: 11
    • View Profile
Re: Two questions.
« Reply #7 on: January 18, 2018, 09:57:20 am »
Just one question this time. I've seen posts mentioning the ability to restrict inventory slots only to certain items, but if it's been implemented I can't for the life of me find a post detailing it.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Two questions.
« Reply #8 on: January 18, 2018, 10:36:44 am »
Just one question this time. I've seen posts mentioning the ability to restrict inventory slots only to certain items, but if it's been implemented I can't for the life of me find a post detailing it.

You can make an armor, with fixed item(s), and make these item(s):
- fixed to a specific slot (e.g. backpack)...
- non-transparent black (i.e. if you wanted to simulate a disappearing slot)

Code: [Select]
armors:
  - type: STR_SYNTH_SPACE_SUIT_UC
    spriteSheet: PIR_674.PCK
    spriteInv: MAN_675
    customArmorPreviewIndex: 79
    builtInWeapons:
      - INV_NULL_3X3     # blocks backpack
      - INV_NULL_2X1_B   # blocks belt
      - INV_NULL_1X1_RS  # right shoulder
      - INV_NULL_1X1_LS  # left shoulder
      - INV_NULL_1X1_LL  # left leg
      - INV_NULL_1X1_RL  # right leg
items:
  - type: INV_NULL_3X3
    weight: 0
    bigSprite: 829
    invWidth: 3
    invHeight: 3
    fixedWeapon: true
    defaultInventorySlot: STR_BACK_PACK
    recover: false
#
etc.
« Last Edit: January 18, 2018, 10:38:46 am by Meridian »

Offline Snowfield

  • Sergeant
  • **
  • Posts: 11
    • View Profile
Re: Two questions.
« Reply #9 on: January 18, 2018, 11:41:50 am »
I poked through the code just now and supportedInventorySections is actually what I was looking for. It's a per-item restriction, though, so if one wanted to have a slot only accept certain items then I suppose one would have some amount of copy-pasting to look forward to.

Thankfully, I've been wasting all my time typing up design and reference documents, so I haven't actually implemented a damn thing~