GearCity

GearCity

查看统计:
plotz 2018 年 8 月 27 日 上午 7:38
New components without localization file
Hi Eric,

brief question regarding modding and components.
I made a simple testbed introducing more diversity for wankel engine "cylinders" (single, bi-, quad-rotor engines with different cylinder counts). This works as planned.
- This requires me to assign new denominators such as in name="13311" within the components.xml.
- This again leads to the English.xml (would be sufficient for me) or any language file in order to place the respective name.

Questions:
- Do I need to ship that file with my mod? If yes, how can I add it? The Mod Tools do not allow me to include that.
OR
- Would it be sufficient to replace name="13311" with "Single Rotor Wankel" and have the Engine Layout type 13072 refer to the full denomination? I have tried it with Single Rotor Wankel/Bi-Rotor Wankel instead of 13111/13112 in my example, but to no avail. Do I have to place parentheses when using a constant and would then setting localname="0" remove the necessity of shipping the language file?
最后由 plotz 编辑于; 2018 年 8 月 28 日 上午 12:30
< >
正在显示第 1 - 12 条,共 12 条留言
Eric.B  [开发者] 2018 年 8 月 27 日 上午 8:32 
You do not want to mess with localization files. Your mod will be broken with every update, and as such it will crash the game. Plus your mod will no longer work in any other languages.

Let me wrap my head around what you're trying to do. You want to assign "Single, Bi-Rotor, and Quad-Rotor" cylinders to Wankel engine layout.

You would create these cylinder types with the name "Single-Rotor", "Bi-Rotor", and "Quad-Rotor". No localization in the names.

You then go to the engine layout for Wankel and add these cylinders to the cylinder restrictions. Leave the localization flag enabled if any of the restricted cylinders are localized.

If this is what you did, email me the files and I'll take a look at it for you.
最后由 Eric.B 编辑于; 2018 年 8 月 27 日 上午 8:33
plotz 2018 年 8 月 27 日 上午 8:39 
Thanks as always!
Exactly what I had in mind - circumventing the localization options.

Let's go to the .xml code:
1.) Cylinder
Current state:
<cylinder name="13311" type="cylinder" year="1890" death="2222"........ />
To be:
<cylinder name="Single Rotor Wankel" type="cylinder" year="1890" death="2222"

2.) Assignment to engine layout type:
Current state:
<layout name="13072" ... possiblecyl="13311/13312/13313" ... />
To be:
<layout name="13072" ... possiblecyl="Single Rotor Wankel/Bi-Rotor Wankel" ... />

will this work? Do I have to remove the spaces? My first test did not go very well :) .

Eric.B  [开发者] 2018 年 8 月 27 日 上午 8:45 
what does your locale flags look like on these xml lines?
plotz 2018 年 8 月 27 日 上午 9:15 
Engine layout: localName="1" localDesc="1" localParam="1"
[left the stock value, as I did not change the denominator]

Cylinder: localName="0" localDesc="1" localParam="0"
[changed localName from 1 to 0, left the rest as-is]
Eric.B  [开发者] 2018 年 8 月 27 日 上午 9:32 
If your about for the cylinders is not in the localization file, you need to 0 the localDesc. If there are no localized values in the layout's restriction you need to remove the localParam.

Also remember you have to start a new game for any changes to go into effect. And its recommended to use the mod tools.



If the above doesn't work, email me the components.xml file and the pop file for it.
plotz 2018 年 8 月 27 日 上午 10:20 
The about is the same as for the generic Wankel count. Will try again later and get back to you. :)
plotz 2018 年 8 月 28 日 上午 12:37 
Got it... Local parameters for the engine layout had to be set to "0".
最后由 plotz 编辑于; 2018 年 8 月 28 日 上午 12:45
Eric.B  [开发者] 2018 年 8 月 28 日 上午 12:45 
Technically it should still work with the LocalParam set to 1. So if you do have that file, it would be very helpful for me to debug it.

I really just need the .xml file, you don't need to send anything else.
plotz 2018 年 8 月 28 日 上午 12:47 
Here comes the but: This requires me to set up custom fuels etc. for the whole engine type. I can now select the rotor count variants, but no fuels or induction.
Here is the file: https://filehorst.de/d/cgqAhkmu
Eric.B  [开发者] 2018 年 8 月 28 日 上午 1:00 
OK, I found what the problem was, and I'll have it fixed tomorrow for SP2 on Friday or Saturday.
plotz 2018 年 8 月 28 日 上午 1:43 
Oh, it wasn't me? :D That does come as a mild surprise.
Eric.B  [开发者] 2018 年 8 月 28 日 下午 5:06 
Should be fixed now. it'll be in the SP2 update.
< >
正在显示第 1 - 12 条,共 12 条留言
每页显示数: 1530 50