OpenXcom Forum
Modding => Work In Progress => Topic started by: johnny on January 15, 2014, 03:07:42 pm
-
hey guys,
first, i would like to thank you for that wonderful project, its the wet dream of every xcom enthusiast. you kept the feel really like the original, but added cool new stuff! :-)
i would like to ask you three questions:
1) i would like to add the stun/flame grenades to the game. unfortunately, i dont get the translations working (i am german).
did i understand it right that custom translations will be made only in the rule file so i dont need to add things to the language files?
in the grenades mod, the author put all the translations together (see screenshot).
is there any guideline, how to correctly translate strings in openxcom?
2) is there any possibility to add the combat knife as standalone weapon? i only found it inside the war package, which adds alot stuff, which is all not translated in german language.
3) i downloaded the war package and saw in the readme, that the openxcom version is around 0.4.5. is there any chance to play the war-mod with the 0.9 build?
thanks in advance,
j.
-
Hello Johnny,
Congratulations on your first post and welcome to the community! This comes from someone who first posted here, uh, two days ago. :P
1) That's right, all you need to do in order to add a translation is to include a relevant section in the ruleset file. Simply copy the entire fragment in English (or any other language), past it just below (also in the ExtraStrings section), change the type to German (not sure what the code is; for American English it's "en-US", while for British English it's "en", and insert the German text.
2) You can find a fully functional knife, made by Warboy1982, here (https://openxcom.org/forum/index.php/topic,1300.0.html). I'm using it myself.
3) This is something I could like to know myself :) I guess you can always revert to 0.4.5 if all else fails.
-
1) i would like to add the stun/flame grenades to the game. unfortunately, i dont get the translations working (i am german).
did i understand it right that custom translations will be made only in the rule file so i dont need to add things to the language files?
in the grenades mod, the author put all the translations together (see screenshot).
is there any guideline, how to correctly translate strings in openxcom?
Your procedure is correct, but it looks like Notepad has mangled the format, so I would recommend using an editor like Notepad++ (https://notepad-plus-plus.org/) to edit the rulesets without breaking them (see here (https://www.ufopaedia.org/index.php?title=Rulesets_(OpenXcom)#Editing_Rulesets_.28YAML.29)).
2) is there any possibility to add the combat knife as standalone weapon? i only found it inside the war package, which adds alot stuff, which is all not translated in german language.
You can find standalone mods here (require nightly builds): https://openxcom.org/forum/index.php/board,16.0.html
3) i downloaded the war package and saw in the readme, that the openxcom version is around 0.4.5. is there any chance to play the war-mod with the 0.9 build?
The OpenXcom War mod was made by directly changing the 0.4.5 source code, which is mostly obsolete now, so it's not upgradable (0.4.5 didn't even have support for mods). Most stuff you can find as standalone mods in the forum mentioned above, but for the rest you'll have to wait for whenever Warboy has time to rewrite it for the newest version.
-
3) waiting until 1.0
-
2) is there any possibility to add the combat knife as standalone weapon? i only found it inside the war package, which adds alot stuff, which is all not translated in german language.
Adding that weapon alone is not that difficult a little troublesome but it can be done,
You need:
Sprites: bigobs, handobs and floorobs
They all have to be introduced into the game via the ruleset.
Then you need to again modify the ruleset to allow introduce this weapon, you need to define the weapon, give it an ufopedia which links to the language file. Then in the language file you need to create an article.
This is the way i did it,
In the items section of the ruleset add
- type: STR_COMBAT_KNIFE
size: 0.1
costBuy: 100
costSell: 50
weight: 4
bigSprite: 57 https://this is your bigobs sprite the number can change if you add other sprites
floorSprite: 73
handSprite: 128
hitSound: 39
hitAnimation: 0
power: 60
damageType: 7
accuracyMelee: 80
tuMelee: 12
battleType: 3
twoHanded: false
invWidth: 1
invHeight: 2
armor: 12
Since this weapon is not part of research tree you can skip the research and manufacture sections
Then create a link in the ufopedia section:
- id: STR_COMBAT_KNIFE
type_id: 4
section: STR_WEAPONS_AND_EQUIPMENT https://this section tells where the weapon is classified in your ufopedia
text: STR_COMBAT_KNIFE_UFOPEDIA https://this one is the article and creates a link to your language file.
Finally go to your language file create an entry follow the proper format
STR_COMBAT_KNIFE_UFOPEDIA: My awesome knife
I hope that helps a little.
PS> I am just learning also :)
EDIT: Almost forgot you need to add the sprites :)
- type: BIGOBS.PCK
singleImage: true https://this is because you are adding a single image if not you will have to enter width and height of the sprite sheet
subX: 32 https:// your sprite X
subY: 49 https:// your sprite Y
files:
57: Resources/.../Combatknife.png https://Assuming your file is called combatknife.png and the location of your file.
- type: FLOOROB.PCK
files:
73: Resources/.../CombatKnife.gif
- type: HANDOB.PCK
width: 256 https:// This are my values your may differ
height: 40
subX: 32
subY: 40
files:
128: Resources/.../CombatKnife.png
-
i'd suggest NOT editing the language files that ship with the game, and instead make use of the ExtraStrings section of the ruleset.
-
there is an ExtraString section!!!! :-X
well you learn something new everyday
-
hey guys,
thank you very much for your help, editing it with notepad ++ made it work :).
i will post my translations in the relevant topics too, if some other german guys want to use them.
unfortunately i got another problem, maybe some of you can help me here?
https://openxcom.org/forum/index.php/topic,1816.0.html
cheers,
johannes