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 ... 42 43 [44] 45 46
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]
  - type: en-US
      # Research Entry Name
      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"

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?

Perfect! ^_^

Thank you for the information.

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]
    weight: 12
    accuracyAimed: 9
    listOrder: 50

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

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]
    category: STR_CRAFT
    space: 28
    time: 1200
    cost: 220000

However, you MUST have the manufacturing category be STR_CRAFT. If instead you attempt the following code:
Code: [Select]
    space: 28
    time: 1200
    cost: 220000

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/ [0xb7393833]
[04-12-2017_11-54-59] [FATAL] /usr/lib/i386-linux-gnu/ [0xb73938ad]
[04-12-2017_11-54-59] [FATAL] /usr/lib/i386-linux-gnu/ [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.

Help / Re: Using the same listOrder: value in different mods.
« on: December 04, 2017, 03:58:31 pm »
Thank you for explaining how listOrder: operates.

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?

Help / Re: A few questions about extraSprites:
« on: November 28, 2017, 03:47:53 pm »
@ bulletdesigner:
If I understand you correctly each *.PCK is a sprite sheet composed of the images added via the files: list.

Thank you for posting the ufopaedia links I'm finding them useful for locating the value range used by the base x-com sprites.

Code: [Select]
X-Com 1: 0 to 53
X-Com 2: 0 to 53

X-Com 1: 0 to 15
X-Com 2: 0 to 15

X-Com 1: 0 to 56
X-Com 2: 0 to 65

X-Com 1: 0 to 72
X-Com 2: 0 to 81

X-Com 1: 0 to 127
X-Com 2: 0 to 439

X-Com 1: 0 to 55
X-Com 2: 0 to 67

X-Com 1: 0 to 3
X-Com 2: 0 to 3

X-Com 1: 0 to 384
X-Com 2: 0 to 384

X-Com 1: 0 to 13
X-Com 2: 0 to 15

X-Com 1: 0 to 54
X-Com 2: 0 to 67

@ Ohartenstein23:
That's a pretty clever way of preventing the mods from interfering with each other.

Even if the 1000 assigned values limit was reached all that would be required is creating a new mod to gain access to an additional 1000 values.

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]
    singleImage: true
    width: 320
    height: 200
      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
  - type: BIGOBS.PCK
      57: Resources/ModA/CoolArmors/ArmorImage.png

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

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

Code: [Select]
# ModB
  - type: CustomItemImagePack
      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.

Help / Re: a question about retaliation races
« on: November 23, 2017, 03:27:43 pm »
(I could be wrong about this as I've only read the UFOpaedia Ruleset Reference on the subject and not actually worked with this type of code yet, so please take my suggestion with a grain of salt.)

With the raceWeights: list I believe the number after each STR_ALIENRACE: variables is the percentage of chance for that race to be assigned as the crew of the craft for the retaliation mission.

So instead of setting it to false try setting it to 0 which should in theory serve the same function as a false value.

Help / Re: Trying to create 2x2 Unit with a custom corpse sprite.
« on: November 23, 2017, 07:00:52 am »
i will try to help you make a 2x2 unit
In this case I was modifying an existing mod as kind of a tutorial project so fortunately those variables already had been assigned. Thank you for posting your template having it will make creating a new 2x2 unit much easier.

I think the issue is that you put a '/' before 'Resources.' Try replacing /Resources/Test_Tanks/filename.png with Resources/Test_Tanks/filename.png.
Thank you for spotting that, the extra "/" does indeed appear to have been the problem. Everything is now working correctly when the aliens cause the tanks to stop working correctly. -_^

please upload a .zip of the whole mod.
Sorry about that. I was modifying someone else's mod as a training exercise and I wasn't sure about what the forum etiquette was for uploading a mod based on another's work.

Which I see now was redundant as the original author mentioned on the mods forum thread: "As always, feel free to use whatever for whatever."

So I'll upload it there in case anyone is curious.

Basically I was just modifying the Alloy Ground Tanks mod by CryptoCactus to use Hellrazor's Alloy Tank Corpse sprites.

[HWP/Resource] Alloy Ground Tanks v1.4 by CryptoCactus

Released Mods / Re: [HWP/Resource] Alloy Ground Tanks v1.5MA
« on: November 23, 2017, 06:44:40 am »
As always, feel free to use whatever for whatever.
Leaving some proper Alloy Tank Corpse Sprites here for convinience
And thus I am adding a new unofficial version to this excellent Alloy Tank mod, V1-5MA. (MA = Martian Alternative)

The MA attached to the version number should make it easy to differentiate between a true CryptoCactus V1.5 release and this alternative one.

I was rather disappointed when Alloy Tanks did not appear in vanilla X-Com, thank you for creating this mod and introducing them to the battlefield.

v 1.5MA - Updated to use the Alloy Tank Corpse sprites Hellrazor was nice enough to post onto this forum thread.

Help / Re: Is it possible to create units with 2 fixed weapons?
« on: November 22, 2017, 09:34:41 am »
Thank you! ^_^

I'll look them up immediately.

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.

Help / Re: Trying to create 2x2 Unit with a custom corpse sprite.
« on: November 22, 2017, 07:48:17 am »
I also tried instead to make a directory into a sprite sheet as instructed by the UFOpaedia Ruleset Reference.

This is the attempted code:

Code: [Select]
    singleImage: true
    width: 32
    height: 40
      0: /Resources/Test_Tanks/Corpse/

GIANTBUNNY.PCK was used in the tutorial example so I gave it a try. Using FLOOROB.PCK also produces the same error message.

Here is the openxcom.log error:

Code: [Select]
[22-11-2017_00-39-45] [INFO] Loading extra resources from ruleset...
[22-11-2017_00-39-46] [INFO] requested file not found: /Resources/Test_Tanks/Corpse/
[22-11-2017_00-39-46] [ERROR] /Resources/Test_Tanks/Corpse/:Couldn't open /Resources/Test_Tanks/Corpse/

Pages: 1 ... 42 43 [44] 45 46