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.


Topics - The Martian

Pages: 1 ... 7 8 [9] 10
121
Help / Controlling the speed of the explosion image and/or disabling it?
« on: January 17, 2018, 09:11:45 am »
Is there a variable like bulletSpeed: and explosionSpeed: that controls the speed that the large blastRadius: explosion image plays at?

Also is there a way to turn off the explosion image so that it doesn't play at all?

122
Help / Weapons that use their own clipSize: for ammo vanish when empty?
« on: January 16, 2018, 11:21:49 am »
If the clipSize: of a weapon like the Laser Rifle is changed from -1 (Infinite) to a positive value it vanishes when the clip (In this case the weapon itself) is depleted.

Code: [Select]
Example code:
  - type: STR_LASER_RIFLE_ALT
    size: 0.2
    costSell: 36900
    weight: 8
    bigSprite: 0
    floorSprite: 0
    handSprite: 8
    bulletSprite: 6
    fireSound: 11
    hitSound: 19
    hitAnimation: 36
    power: 60
    damageType: 4
    accuracyAuto: 46
    accuracySnap: 65
    accuracyAimed: 100
    tuAuto: 34
    tuSnap: 25
    tuAimed: 50
    clipSize: 5 # Changed from -1
    battleType: 1
    twoHanded: true
    invWidth: 1
    invHeight: 3

(Question): Is there a way to override this and make the weapon just display the standard "Out of ammo" message instead of vanishing?
(Answer): "That's currently not possible."

123
Unfortunately https://ufopaedia.org appears to be currently down.

Is there a mirror of the excellent Ruleset Reference Nightly page resource?


Ironically the site gives an error that says:
Quote
"This page (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)) is currently offline. However, because the site uses Cloudflare's Always Online™ technology you can continue to surf a snapshot of the site. We will keep checking in the background and, as soon as the site comes back, you will automatically be served the live version. Always Online™ is powered by Cloudflare"

Followed immediately by:
Quote
"Website is offline - No cached version of this page is available."

So it appears that this "Always Online" program is also currently not functioning.

124
Help / A few questions about the use of shotgunPellets:
« on: December 17, 2017, 12:43:28 pm »
I've been trying to create new equipment using the shotgunPellets: variable and have a few questions about how it operates.


(Question): By default shotgunPellets: has a value of 0.  Does giving this variable a value of 2 fire only two bullets or three?
(Answer): shotgunPellets: 2 fires only two bullets,  not two pellets in addition to the default bullet being fired by the weapon.


(Question): If the weapon has shotgunPellets: 5 but the ammo loaded into the weapon does not use the shotgunPellets: variable, will the ammo now fire multiple bullets?
(Answer): The shotgunPellets: variable on a weapon is overridden by that variable on that weapon's ammo, so the answer is that a weapon with shotgunPellets: will not cause standard ammo to fire multiple projectiles.


(Question): Do shotgunPellets: consume additional ammunition for each pellet fired?
(Answer): Regardless of how many pellets are fired, each shot only takes 1 unit of that weapon's ammo.


(Question): If the weapon/ammo type has a blastRadius: and is also using shotgunPellets: will each pellet produce an explosion where they hit?
(Answer): Each pellet does create an explosion at the impact location.
(Note): Make sure to set hitAnimation: to 0 so that the default explosion animation from X1.PCK is used.


(Question):  It appears shotgunPellets: are unaffected by the accuracyAimed: variable. Behaving the same at accuracyAimed: 60 as they do at 1000. Is there a way to control how far the pellets spread out when fired?
(Answer): The pellet spread behavior is automatically calculated using this method: "It's a linear dropoff of 5% per pellet applied sequentially, so one pellet is at 100% accuracy, one is 95%, one is 90% and so on until it bottoms out."

125
Help / What is "None" type damage?
« on: December 16, 2017, 09:05:47 am »
I was looking at the Ruleset Reference Nightly's section for Armor: and noticed a variable attached to damageModifier: called "None".

What is "None" type damage used by?

126
Help / Can manufacturing projects produce soldiers?
« on: December 13, 2017, 03:58:51 pm »
I've seen some mods that allow you to hire different types of soldiers from the purchasing menu.

Is it possible for a manufacturing project to produce a soldier instead of an item, HWP or craft?

127
Open Feedback / UFOpedia vs UFOpaedia?
« on: December 13, 2017, 03:48:17 pm »
I've seen the X-Com research report archive being called both UFOpedia and UFOpaedia.

UFOpedia is the word I see on the in game menus but UFOpaedia can be found being used in several mods.
(Not to mention the UFOpaedia site)


Which term is the accepted or more commonly used of the two?

128
Help / An example of how to use {NEWLINE} to separate blocks of text.
« on: December 08, 2017, 07:16:07 pm »
I figured this information may be of use to anyone creating a mods with UFOpedia entries that have large amounts of text in them.

If you wish text to appear on a new line there is an easy way to do this.

Add the {NEWLINE} command into your string when you wish the text to start on the next line, two of them placed in a row will create a space between paragraphs like so: {NEWLINE} {NEWLINE}

Here's an example of a UFOpedia entry using {NEWLINE} to create 3 text blocks:

Code: [Select]
extraStrings:
  - type: en-US
    strings:
      # Research Entry Name
      STR_NEWLINE_EXAMPLE: "NEWLINE Example"
      STR_NEWLINE_EXAMPLE_UFOPEDIA: "I figured this may be of use to anyone creating a mods with UFOpedia entries that have large amounts of text in them. {NEWLINE}{NEWLINE}If you wish text to appear on a new line there is an easy way to do this.{NEWLINE}{NEWLINE}Add the NEWLINE command into your string when you wish your text to start on the next line, two of them placed in a row would create a space between paragraphs like so: NEWLINE NEWLINE"


129
The UFOPaedia Ruleset Reference lists needItem: as accepting True & False as input and only checking if there is an item in your base inventory with the same name as the research project.

Is it possible to specify which item needItem: checks for?

Using the item's name as the research projects name isn't viable as a project with that name already exists.


Additionally if it is possible to alter which item needItem: checks, is it also possible to change the item removed by the destroyItem: variable?

130
Help / Altering existing item's values the have been added by other mods
« on: December 04, 2017, 07:39:44 pm »
If you are altering the values of an item that was introduced in a different mod, what is the best way to go about it?

Should the "- delete: STR_ITEM_NAME" command be used and then the entire item be redefined in your new mod?

Or can individual values be changed from within your mod while leaving the source mods values untouched?

Example, change the weight and accuracy of the laser rifle without redefining it entirely:

Code: [Select]
  - type: STR_LASER_RIFLE
    weight: 12
    accuracyAimed: 9
    listOrder: 50


Or for example adding the variable that prevents HWP from accessing their inventory during battle:
Code: [Select]
armors:
  - type: EXAMPLE_ARMOR
    allowInv: false

131
Help / Manufacturing a Craft from a Craft.
« on: December 04, 2017, 07:17:23 pm »
I was not sure if this is how OpenXcom is intended to work or if it is a bug but I thought it may be of interest to others who are trying to construct a mod so I'm posting the information here.


If you try to create a manufacturing project that uses a craft as required source material and the end product is also a craft, there is no problem if you write the code like this:

Code: [Select]
manufacture:
  - name: STR_INTERCEPTOR_TO_SKYRANGER
    category: STR_CRAFT
    space: 28
    time: 1200
    cost: 220000
    requiredItems:
      STR_INTERCEPTOR: 1
    producedItems:
      STR_SKYRANGER: 1

However, you MUST have the manufacturing category be STR_CRAFT. If instead you attempt the following code:
Code: [Select]
manufacture:
  - name: STR_INTERCEPTOR_TO_SKYRANGER
    category: STR_CUSTOM_CATEGORY
    space: 28
    time: 1200
    cost: 220000
    requiredItems:
      STR_INTERCEPTOR: 1
    producedItems:
      STR_SKYRANGER: 1

The custom category will produce the following error:
Code: [Select]
[04-12-2017_11-54-59] [FATAL] A fatal error has occurred: Item STR_SKYRANGER not found
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom13CrossPlatform10stackTraceEPv+0x1e) [0x824301e]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom13CrossPlatform9crashDumpEPvRKSs+0x444) [0x8243834]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_Z15exceptionLoggerv+0x5f) [0x80f1f1f]
[04-12-2017_11-54-59] [FATAL] /usr/lib/i386-linux-gnu/libstdc++.so.6(+0x70833) [0xb7393833]
[04-12-2017_11-54-59] [FATAL] /usr/lib/i386-linux-gnu/libstdc++.so.6(+0x708ad) [0xb73938ad]
[04-12-2017_11-54-59] [FATAL] /usr/lib/i386-linux-gnu/libstdc++.so.6(__cxa_rethrow+0) [0xb7393b70]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZNK8OpenXcom3Mod7getRuleINS_8RuleItemEEEPT_RKSsS6_RKSt3mapISsS4_St4lessISsESaISt4pairIS5_S4_EEEb+0x16b) [0x84397cb]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZNK8OpenXcom3Mod7getItemERKSsb+0x62) [0x8411232]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom20ManufactureInfoState14initProfitInfoEv+0xcc) [0x812766c]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom20ManufactureInfoState7buildUiEv+0x1668) [0x8129d48]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom20ManufactureInfoStateC2EPNS_4BaseEPNS_15RuleManufactureE+0x3d) [0x812b0ad]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom21ManufactureStartState13btnStartClickEPNS_6ActionE+0x41a) [0x812d50a]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom18InteractiveSurface6handleEPNS_6ActionEPNS_5StateE+0x1a2) [0x8261892]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom5State6handleEPNS_6ActionE+0x7b) [0x83028eb]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(_ZN8OpenXcom4Game3runEv+0x2e8) [0x825c848]
[04-12-2017_11-54-59] [FATAL] /tmp/.mount_OpenXc8hpJ9e/usr/bin/openxcom(main+0x165) [0x80dc215]
[04-12-2017_11-55-05] [FATAL] OpenXcom has crashed: Item STR_SKYRANGER not found
Extra information has been saved to openxcom.log.


What I believe this means is that when the manufacturing project Category is not set to STR_CRAFT the producedItems: needs to be an entry listed under items: not one list under the crafts: entries.

132
Help / Using the same listOrder: value in different mods.
« on: November 29, 2017, 11:27:53 pm »
If two (or more) mods have items / research / etc that assign something to the same position using listOrder: what happens?

From what I can see it appears that doing this increases the position of the item that previously occupied that value by +1.




Are there any negatives to having overlapping listOrder: positions?

Does inserting a new item at an already occupied value move every item that has an equal or greater value by +1, or is it just the overlapping entry that gets moved?




133
Help / A few questions about extraSprites:
« on: November 27, 2017, 03:37:07 pm »
I have a few questions about the use of extraSprites: in *.rul files.



Question #1:
When a *.SPK or *.PCK file is assigned after "- type:" I've noticed some mods create new file names while others use existing *.pck files that are already part of x-com and add to them.

For example in the Final Mod Pack several new sprites are added to BIGOBS.PCK while others have what I assume is a custom file assigned to them like the Ufopaedia entry for Alien Gardens which is archived into ALIENGARDENS.SPK.
Code: [Select]
extraSprites:
  - type: ALIENGARDENS.SPK
    singleImage: true
    width: 320
    height: 200
    files:
      0: Resources/FinalModPack/UfopediaTechPics/aliengardens.png

What are the rules for which kinds of images are required to be added to existing files and which ones should have new *.pck files assigned to them?




Question #2:
While learning how to mod
OpenXcom I've been digging around inside other peoples mods to see examples of how .rul files work.

So far I've noticed that when several mods add sprites to BIGOBS.PCK they start adding at the value of "files: 57" which I'm assuming is to prevent overwriting classic x-com graphics that are stored at lower numbers.

For example: FMP adds an image to 44 which appears to be replacing the corpse image for standard X-Com Power Armor.

I've read that if two different mods index a sprite to the same number as long as it is higher than a base X-Com graphics number it won't overwrite the other mods image data.

Do I understand this correctly or should I be keeping track of the highest "files: #" value used in other mods I anticipate to be running in combination with my own mod to prevent using the same values?



Question #3:
If the answer to question #2 is that two mods that both have the same value assigned to a sprite do not overwrite each other like in the following code examples:

Example 1:

Code: [Select]
# ModA
extraSprites:
  - type: BIGOBS.PCK
    files:
      57: Resources/ModA/CoolArmors/ArmorImage.png

Code: [Select]
# ModB
extraSprites:
  - type: BIGOBS.PCK
    files:
      57: Resources/ModB/InterestingWeapons/WeaponImage.gif

Example 2:
Code: [Select]
# ModA
extraSprites:
  - type: CustomItemImagePack
    files:
      57: Resources/ModA/Item1.png

Code: [Select]
# ModB
extraSprites:
  - type: CustomItemImagePack
    files:
      57: Resources/ModB/Item2.gif


Can I access the sprites assigned in ModA via code in ModB?



Question #4:
Is there a max number of sprites that can be assigned via extraSprites: or perhaps any values I should steer clear of using?
(I read something about keeping defined sprites within a value range of 1000.)





Any additional pointing out of common pit falls or tips about adding new sprites that are not related to these questions would also be greatly appreciated.

134
Help / Is it possible to create units with 2 fixed weapons?
« on: November 22, 2017, 09:15:33 am »
I was reading the [HWP] Attack Dog forum thread and I noticed Dioxine mentioning that units cannot have 2 fixed weapons.
. . . YOU of all people should know you can't have 2 fix'd weapons... at least not until you code it :)

Is this inability still present as of the latest OpenXcom Nightlies release? (2017-11-09)


. . . but I'll be keeping its one "hand" empty despite the new ability to block it with an offhand fixed weapon (thanks, Warboy!)
This quote seems to imply that it was added, but I haven't located additional information on how to assign an offhand fixed weapon yet.

135
Help / Trying to create 2x2 Unit with a custom corpse sprite.
« on: November 21, 2017, 06:57:20 am »
(Version of OpenXcom used is: "Nightlies 2017-11-02" Linux release.)



I've been trying to build a mod that introduces a 2x2 unit with a custom corpse sprite.
(I'll try tackling altering the 2x2's living sprites later.)

However I keep getting an error when I load the four sprites for the 2x2 corpse.


Here's the code I've added that appears to be creating the error.
Code: [Select]
extraSprites:
  - type: FLOOROB.PCK
    singleImage: true
    width: 32
    height: 40
    files:
      500: /Resources/Test_Tanks/FloorOb_TestTank_Corpse_1.png
      501: /Resources/Test_Tanks/FloorOb_TestTank_Corpse_2.png
      502: /Resources/Test_Tanks/FloorOb_TestTank_Corpse_3.png
      503: /Resources/Test_Tanks/FloorOb_TestTank_Corpse_4.png

I've made the new images load to the high values of "files: 500-503" so as not to overlap with anything used in the other mods I have installed. (Like the excellent Final Mod Pack.)

Code: [Select]
items:
  - type: TEST_TANK_CORPSE_1
    floorSprite: 500
    invWidth: 0
    invHeight: 0
    recover: false
  - type: TEST_TANK_CORPSE_2
    floorSprite: 501
    invWidth: 0
    invHeight: 0
    recover: false
  - type: TEST_TANK_CORPSE_3
    floorSprite: 502
    invWidth: 0
    invHeight: 0
    recover: false
  - type: TEST_TANK_CORPSE_4
    floorSprite: 503
    invWidth: 0
    invHeight: 0
    recover: false


Code: [Select]
armors:
  - type: TEST_TANK_ARMOR
    spriteSheet: NEWTANKS.PCK
    allowInv: false
    corpseBattle:
      - TEST_TANK_CORPSE_1
      - TEST_TANK_CORPSE_2
      - TEST_TANK_CORPSE_3
      - TEST_TANK_CORPSE_4
    frontArmor: 100
    sideArmor: 100
    rearArmor: 90
    underArmor: 90
    drawingRoutine: 2
    size: 2
    loftempsSet: [92, 89, 90, 91]
    damageModifier:
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 0.0




In the openxcom.log file the following error was recorded:
Code: [Select]
[20-11-2017_22-54-34] [INFO] Loading extra resources from ruleset...
[20-11-2017_22-54-35] [INFO] requested file not found: /Resources/Test_Tanks/FloorOb_TestTank_Corpse_1.png
[20-11-2017_22-54-35] [ERROR] /Resources/Test_Tanks/FloorOb_TestTank_Corpse_1.png:Couldn't open /Resources/Test_Tanks/FloorOb_TestTank_Corpse_1.png



The mods file directory structure looks like this:
Code: [Select]
- openxcom
-- mods
--- Test_Tanks
---- Resources
----- Test_Tanks
------ FloorOb_TestTank_Corpse_1.png
------ FloorOb_TestTank_Corpse_2.png
------ FloorOb_TestTank_Corpse_3.png
------ FloorOb_TestTank_Corpse_4.png
---- Ruleset
----- *.rul (All the *.rul files belonging to this mod.)


As far as I can tell the four corpse *.png images are in the correct location.

I'd appreciate it if someone could point out what I'm doing wrong or link me to a tutorial on the subject.

Pages: 1 ... 7 8 [9] 10