aliens

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - The Martian

Pages: [1] 2 3 ... 46
1
Suggestions / Re: Toss grenades around corners.
« on: February 27, 2023, 11:39:13 pm »
Actually you could make it work like Blaster Launcher... But it won't be a thrown grenade, it will be a one-shot "gun".
I need to get my hands on that code.

I may be misunderstanding but do you mean something like this:
Code: [Select]
items:
  - type: STR_EXAMPLE_WEAPON
    size: 0.2
    costSell: 36900
    weight: 8
    bigSprite: 19
    floorSprite: 19
    bulletSprite: 6
    fireSound: 11
    hitSound: 19
    hitAnimation: 36
    power: 60
    damageType: 4
    accuracyAimed: 100
    tuAimed: 50
    clipSize: 1 # <==
    battleType: 1
    twoHanded: true
    invWidth: 1
    invHeight: 1
    arcingShot: true # <==
    maxRange: 1 # <==
    waypoints: 2 # <==
    accuracyMultiplier:
      firing: 0.0
      throwing: 1.0

The above code is untested I'm not sure if arcingShot: works with the waypoints: setting.

2
Help / Re: Colors from palette turning invisible
« on: February 22, 2023, 12:59:22 pm »
I'll attach these palette charts to this thread, perhaps they can be useful.

Both are for the Battlescape palette.
Spoiler:
X-COM: UFO Defense

X-COM: Terror From The Deep

3
OpenXcom Extended / Re: [Question] Should the soldier bonuses stack?
« on: February 20, 2023, 06:13:34 pm »
They do not stack when they are the same level, but do stack when different levels.

Do you mean that a bonus of 2 will not stack with another bonus of 2, but a bonus of 2 will stack with a bonus of 4?

If so I'll take any stacking I can get so that is welcome.

4
OpenXcom Extended / Re: [Question] Should the soldier bonuses stack?
« on: February 20, 2023, 05:58:28 pm »
Soldier bonuses of the same type (regardless whether from transformations or from commendations) currently don't stack.

Not exactly sure if that's a feature or a bug. (I'll need to dig deeper in history)

Opinions?

I would like them to stack if possible.

Although to keep support for mods that already are using this feature and count on them not stacking, perhaps there could be a toggle for how they operate?

5
The X-Com Files / Re: The X-Com Files - 2.8: The Lunar Protocol
« on: February 19, 2023, 08:55:06 pm »
I think it's a bug, i have OXCE 7.8 and I can only change 12 aspects of the 72 that exist.

If you scroll down to the bottom of the official download & installation guide post there is a section that says:
"Looking for bleeding edge OXCE nightly preview builds? Try here: https://lxnt.wtf/oxem/#/Extended"

That is where you can find version 7.8.7 of OXCE which from what I've read should correct the bug you are experiencing.

The version on mod.io is only V7.8 not 7.8.7. The newer 7.8.7 I believe can only be obtained currently from this location: https://lxnt.wtf/oxem/#/Extended

6
Help / Re: OpenXcom supports only 8bit images.
« on: February 19, 2023, 06:11:28 am »
The handSprite: variable in the items: entry is being assigned the value of the first frame in the set. It will automatically use that frame and the next 7 images found in the HANDOB.PCK for use as that item's eight directional images for the hand held object.

So if you wanted to have them all on a single sheet you would type something like this with NewHeight & NewWidth being the X,Y size of your large sheet of HandObs.

Code: [Select]
extraSprites:
  - type: HANDOB.PCK
    height: NewHeight
    width: NewWidth
    subX: 32
    subY: 40
    files:
      129: Resources/LargeSingleSheetOfHandObs.png

The above code would assign every value from 129 to however many frames can be divided by 32x40 from the LargeSingleSheetOfHandObs.png's NewHeight by NewWidth size.

So lets say the LargeSingleSheetOfHandObs.png was big enough to add 10 sets of HandObs to the game. When you want to access the 4th set from that sprite sheet you would need to type this in the items: handSprite: variable

Code: [Select]
items:
  - type: STR_ALIEN_CANNON
    handSprite: 153





Although you can place all of the HandObs on one large sprite sheet I would suggest you instead keep each item's HandObs in their own eight frame image file.

This setup can be helpful as you just need to copy the value for the image set in extraSprites: to your items: handSprite: variable and it will work. With each image's file name making searching for a specific item's HandOb simple in most text editors.

Code: [Select]
extraSprites:
  - type: HANDOB.PCK
    height: 40
    width: 256
    subX: 32
    subY: 40
    files:
      129: Resources/RT-20_handob.png
      137: Resources/Example_Plasma_Rifle_HandOb.png
      145: Resources/Example_Rocket_Launcher_HandOb.png
      153: Resources/Example_Sniper_Rifle_HandOb.png
      169: Resources/Example_Pistol_HandOb.png
      177: Resources/Example_Alien_Raygun.png
      185: Resources/Example_Yet_Another_Piece_Of_Equipment.png
Code: [Select]
items:
  - type: STR_RT_20
    handSprite: 129

  - type: STR_PLASMA_RIFLE
    handSprite: 137

  - type: STR_ROCKET_LAUNCHER
    handSprite: 145

  - type: STR_SNIPER_RIFLE
    handSprite: 153

  - type: STR_PISTOL
    handSprite: 169

  - type: STR_ALIEN_RAYGUN
    handSprite: 177

  - type: STR_YET_ANOTHER_PIECE_OF_EQUIPMENT
    handSprite: 185

7
Help / Re: OpenXcom supports only 8bit images.
« on: February 18, 2023, 11:13:37 am »
Your examples are good Martian, I'll just correct what's supported and what's not.
Thank you Meridian.

I know that my terminology isn't the most precise so the increased clarity is welcome.

8
OXCE Suggestions NEW / Re: [Suggestion/Y-Scripts]setDeathFrames
« on: February 18, 2023, 10:47:25 am »
My mistake, sorry about that.

9
Offtopic / Re: If XCOM was set in the 1910s.
« on: February 18, 2023, 10:39:35 am »
Good news, there is an X-Com mod that allows you to fight that war:
The Great War of the Worlds 1914

10
Help / Re: OpenXcom supports only 8bit images.
« on: February 18, 2023, 02:01:41 am »
You are trying to define each HandOb frame as a single image, they should instead be loaded in sets of eight. (Edit by Meridian: both approaches are correct, 8 single images and also 1 set of images)

Don't do this:
Code: [Select]
items:
  - type: STR_HEAVY_CANNON
    bigSprite: 57
    floorSprite: 73
    handSprite: 129
    handSprite: 130
    handSprite: 131
    handSprite: 132
    handSprite: 133
    handSprite: 134
    handSprite: 135
    handSprite: 136

Code: [Select]
extraSprites:
  - type: HANDOB.PCK
    files:
      129: Resources/RT-20_handob_129.png
      130: Resources/RT-20_handob_130.png
      131: Resources/RT-20_handob_131.png
      132: Resources/RT-20_handob_132.png
      133: Resources/RT-20_handob_133.png
      134: Resources/RT-20_handob_134.png
      135: Resources/RT-20_handob_135.png
      136: Resources/RT-20_handob_136.png


Instead do this:
Code: [Select]
items:
  - type: STR_HEAVY_CANNON
    bigSprite: 57
    floorSprite: 73
    handSprite: 129


Code: [Select]
extraSprites:
  - type: HANDOB.PCK
    height: 40
    width: 256
    subX: 32
    subY: 40
    files:
      129: Resources/RT-20_handob.png

All eight HandOb frames should be in the same .png file from which OpenXcom will automatically slice each frame of the 40x256 sized image into 32 by 40 images.

The items: handSprite: value needs to be configured to the first frame in the 8 frame set. (The rest do not need to be defined) (Edit by Meridian: the rest MUST NOT be defined.)

Each new entry in extraSprites: for HANDOB.PCK needs to have its value set to be eight higher than the last entry.

Example of the RT-20 and additional equipment:

Code: [Select]
extraSprites:
  - type: HANDOB.PCK
    height: 40
    width: 256
    subX: 32
    subY: 40
    files:
      129: Resources/RT-20_handob.png
      137: Resources/Example_Plasma_Rifle_HandOb.png
      145: Resources/Example_Rocket_Launcher_HandOb.png
      153: Resources/Example_Sniper_Rifle_HandOb.png
      169: Resources/Example_Pistol_HandOb.png
      177: Resources/Example_Alien_Raygun.png
      185: Resources/Example_Yet_Another_Piece_Of_Equipment.png

11
OXCE Suggestions NEW / Re: [Suggestion/Y-Scripts]setDeathFrames
« on: February 18, 2023, 01:21:25 am »
I would like to keep the default 3 for the standard death while being able to extend the more messy ones to 8.

Although it will work a little different I think you can currently script the end goal you want.

Use an altered version of this script Yankes uploaded that changes which frames on a sprite sheet are loaded for the death animation:
https://openxcom.org/forum/index.php/topic,10392.msg144792.html#msg144792

Code: [Select]
extended:
  scripts:
    selectUnitSprite:
      - offset: -2
        code: |
          var int drawingRoutine;
          var int deathFrames;
         
          if or
            eq blit_part blit_torso
            eq blit_part blit_legs
          ;
            var ptr RuleArmor armor;
            unit.getRuleArmor armor;
            armor.getDrawingRoutine drawingRoutine;
            armor.getDeathFrames deathFrames;
            if and
              eq drawingRoutine 0
              gt sprite_index 264  #bigger than first death frame
              gt deathFrames 3
            ;
              sub deathFrames 3;
              add sprite_index deathFrames;
            end;
          end;
          return sprite_index;
Global script, check for `drawingRoutine: 0`  and for e.g. `deathFrames: 5`.

Script shift all frames after death frame by additional death frames.


I think the trick would be to place a check for the type of situation/damage you want right before the frame offset so that a different frame set is used depending on what the unit was hit with.

Pseudocode Example:
Code: [Select]
if situation 1 # (Unit was hit for over 50 of its current health and died)
  sprite_index 264
end

if situation 2 #  (Unit was hit be a fire attack and died)
  sprite_index 274
end

if situation 3 #  (Unit was hit be a stunning attack and collapsed)
  sprite_index 284
end

You would need several sets of the death animation frames each offset by X amount ahead of the last for the script to work. Although it won't let you increase or decrease the number of death frames you can just insert your expected FloorOb for any addtional frames on the sprite sheet for deaths with a lower frame count. (The delay should be very brief)

Here is an example unit sprite sheet of what I mean, the death frames are not currently aligned to the correct index I'm just trying to show what I mean visually:
Spoiler:

12
OXCE Support Y-scripts / Re: Sharing tags defintions betwean files
« on: February 16, 2023, 07:20:02 am »
That will make things easier, thank you.

13
Help / Re: OpenXcom supports only 8bit images.
« on: February 16, 2023, 06:46:23 am »
The images were not in the correct palette.

I put them in the UFO Battlescape palette but unfortunately there was some quality loss. A few pixels on the BigOb and one on the FloorOb shifted their gray a bit.

All I did was download some sprites I found on this forum, and edited them with Paint. What can I do to make it work?
Some image editors can cause problems with the X-Com palette as they try to be helpful and alter the palette when you create your image file.

Here is a list of image editors that have been found to work correctly:
https://openxcom.org/forum/index.php/topic,2676.0.html

You can get the X-Com palette files from this post:
https://openxcom.org/forum/index.php/topic,1557.0.html

And this site can be handy for automatically convert images to the correct palette:
https://buscher.eu.pythonanywhere.com/spritepalette


Although GIMP is grouped the amongst the programs that mess up the palette I've been using it to edit X-Com images successfully.

The important thing to do with GIMP is to select "Image -> Mode -> RGB" Then "Image -> Mode -> Indexed -> Use Custom Palette -> Select X-Com palette" right before exporting. (Just swap the mode back and forth right before export. Strange but it works... most of the time.)

Make sure that "Remove unused and duplicate colors from colormap" is left unchecked in the 'Indexed' menu.

When choosing your file type .png is the best choice as .gif has problems with some Macs.

14
OXCE Suggestions OK / Re: [Suggestion] Continuous wave laser
« on: February 15, 2023, 03:41:36 pm »
So instead of this:


We would be seeing something more like this:

15
Open Feedback / Re: Incendiary mod
« on: February 15, 2023, 01:41:00 am »
Here is a page with a list of the default used image values for base UFO & TFTD:
https://www.ufopaedia.org/index.php/Ruleset_Vanilla_IDs_(OpenXcom)

Only use an existing index if you are deliberately overwriting an image used by the base game, otherwise use a fresh index above those numbers. (It really doesn't hurt to always use numbers above the base games values for the sake of compatibility with other mods.)

Also if you run out of free image index numbers you can increase the number assigned to your mod in your metadata.yml file with the reservedSpace: setting.

For example reservedSpace: 3 will allow your BigOb, FloorOb & HandOb values to range to 3000 instead of the default 1000.

Ruleset Reference - metadata.yml:
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#metadata.yml

Pages: [1] 2 3 ... 46