Posted: Tue Aug 09, 2016 8:07 am Post subject:
[OpenRA] Iowa Class Battleship
In a test to see the possibilities of the OpenRA engine, i've created the iowa class as a SHP unit.
It has
3 triple barreled 16 inch turrets
10 double barreled 5 inch turrets
18 quad barreled MG turrets (ingame visible only 2 barrels)
There are a number of small fixed single barreled MGs on the main deck, which are currently unused.
code example in the zip
the 16 inch turrets use a clone of the 8inch weapon with Burst: 3 that i haven't included. It's up to you to give it balanced and well working weapons.
To install it, copy the SHPs into the OpenRA\mods\ra\bits\ folder.
As usual, credit me if you release a mod with it.
Thanks GD for helping me to get the unit ingame.
Congrats to the OpenRA devs for creating such a great moddable and promising engine.
\Edit
ZIPs uploaded again with updated version
-includes damaged version (just a simple texture change. If you want physical deformations on the model, feel free to modify the 3d model)
-shadow frames (for some reason forgot those)
-superstructure
iowa.gif
Description:
from OpenRA->VLC->mp4->png frames->gif
Filesize:
784.62 KB
Viewed:
12024 Time(s)
IowaIngame.png
Description:
Filesize:
40.45 KB
Viewed:
12067 Time(s)
LKOIowa.zip
Description:
version 2.0, including damaged frames and superstructure
You can also make a damage state for it of you havent done so already, and maybe disable some turrets when its damaged, see UpgradeOnDamage, tho i dont remember if the trait is on the release version yet... GJ btw. _________________
Creator of Shattered Paradise .
ORA Discord https://discordapp.com/invite/tuhp9m6 , SP Discord https://discord.gg/hk428Wk QUICK_EDIT
@MigEater: i plan to release the 3d model of it. Maybe you wanna use it to render a special map prop.
I made a building version for DTA using the same model, just split into 4 parts: body + 16inch turrets, invisible dummy building with 5inch turrets, invisible dummy building with mg turrets
this way it can work on a special map even in the old TS/RA2 engines.
@Nolt: nice idea. I'll see what i can do about the damage state. I made already a simple one for the DTA building version. It's just a different texture with scorch marks and dirt, but better than nothing.
I guess turret 3 (the rear one) will be destroyed and non-functional when damaged. This should look quite nice ingame. _________________ SHP Artist of Twisted Insurrection: Nod buildings
I've uploaded the ZIP's again with a bit updated material, now including
-damaged version
-shadow frames for the main body (somehow forgot those)
-separate superstructure, which covers nicely the turrets behind it
However for the damaged version i have no clue how to implement it.
I couldn't find a UpgradeOnDamage trait on github.
The attached preview was done by switching the normal images.
For some reason, the shadow frames 32-63 of the main body are also not shown ingame. Could this be a problem of a SHP (TS) unit in the SHP (TD) based game?
You just need to exclude the 'GrantPermanent: true' (false is the default).
The sprite body traits then need to be enabled/disabled via the upgrade provided by UpgradeOnDamage.
For example
For some reason, the shadow frames 32-63 of the main body are also not shown ingame. Could this be a problem of a SHP (TS) unit in the SHP (TD) based game?
Have you set ShadowStart: 32 on the sequence(s)? OpenRA doesn't automatically assume that the 2nd half of the frames are shadow frames just because they're SHP(TS) files. QUICK_EDIT
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Thu Aug 11, 2016 10:02 am Post subject:
OpenRA also doesn't use all the colors on the second half of the frames as sahdow, but only the colors the palette designated as such in palettes.yaml.
Reaperrr, technically the wiki isn't outdated - not everyone here mods bleed even. _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
shadow works now. I just had to open iowa.shp and change the index #1 pixel used in the shadow frames to index #4 (since that is used in RA. thanks GD for the palette info)
when adding the damage state, i get an exception
Inner Exception of type `System.InvalidOperationException`: Cannot locate type: UpgradeOnDamageInfo
i changed from this (only the last lines of the unit code)
I'm also still confused by the yaml's key/value structure.
For what exactly is the name after the @ used for? Why is it there in the first place? Is it just a unique identifier to differentiate separate parts that use the same WithFacingSpriteBody or WithSpriteTurret trait,
or is the @NAME actually used somewhere on certain keys?
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Thu Aug 11, 2016 11:16 am Post subject:
Lin Kuei Ominae wrote:
when adding the damage state, i get an exception
Inner Exception of type `System.InvalidOperationException`: Cannot locate type: UpgradeOnDamageInfo
You're using the latest release version. This trait has been added since that release and only available in the bleed version. Exactly the same reason why I complained to Reaperrr for suggesting this.
The code would work fine in bleed, however.
Lin Kuei Ominae wrote:
I'm also still confused by the yaml's key/value structure.
For what exactly is the name after the @ used for? Why is it there in the first place? Is it just a unique identifier to differentiate separate parts that use the same WithFacingSpriteBody or WithSpriteTurret trait,
or is the @NAME actually used somewhere on certain keys?
Bolded the answer. Having this @NAME suffix means OpenRA does not need to maintain lists like Primary-Secondary-ElitePrimary-EliteSecondary and such arbitrary keys. The identifiers are eaten by the parser and only used for inheritance resolution and additional instances.
The yaml is a dictionary, but after processing it, the result ActorInfo is a list of TraitInfos. Having the yaml as a dictionary itself is good to catch a modder error in the form of duplicate keys (since Dictionary throws an exception in that case), but without a suffix, it would also prevent multiple instances of the same trait, which is why the suffix is needed (which the parser will cut down to then feed the result yaml fragments to the respective trait constructors). _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
Joined: 26 Apr 2003 Location: Somewhere in Germany
Posted: Thu Sep 08, 2016 12:49 pm Post subject:
For the record, the trait was renamed to UpgradeOnDamageState, because it now works for the initial damage state as well and doesn't require the state to change, and because it supports 'Undamaged' state as well.
The trait is included in the current playtest. QUICK_EDIT
I have modded many games for years (not just C&C but AOE3, HOMM4, BFME2, and others) and edited hex codes and assembly, but even reading about how OPENRA works makes my head hurt. The aim seems to be making things as complicated as possible by adding redundancy instead of reducing it. Perhaps the code gains some versalitility, but it will only be usable to those that write it... modding won't be accessible to everyone in this platform, since it is more akin to programming than to simple coding. _________________ QUICK_EDIT
You cannot post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum