Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 9:51 pm
All times are UTC + 0
[OpenRA] Iowa Class Battleship
Moderators: Global Moderators, Media Hut Moderators, OpenRA Moderators, Red Alert 2 Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [14 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Aug 09, 2016 8:07 am    Post subject:  [OpenRA] Iowa Class Battleship Reply with quote  Mark this post and the followings unread

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:  11057 Time(s)

iowa.gif



IowaIngame.png
 Description:
 Filesize:  40.45 KB
 Viewed:  11100 Time(s)

IowaIngame.png



LKOIowa.zip
 Description:
version 2.0, including damaged frames and superstructure

Download
 Filename:  LKOIowa.zip
 Filesize:  544.53 KB
 Downloaded:  223 Time(s)


iowa_frames.zip
 Description:
the raw frames, in case you wanna create it with a different palette
(including the damaged frames)

Download
 Filename:  iowa_frames.zip
 Filesize:  3.84 MB
 Downloaded:  324 Time(s)


_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Last edited by Lin Kuei Ominae on Fri May 15, 2020 10:36 am; edited 2 times in total

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Aug 09, 2016 1:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nice Smile This was one of the first things I wanted to test for an OpenRA version of D-day.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Nolt
Cyborg Firebomber


Joined: 25 Apr 2012
Location: Chile

PostPosted: Tue Aug 09, 2016 1:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message Send e-mail Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Aug 09, 2016 2:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

@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. Smile This should look quite nice ingame.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Aug 09, 2016 2:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks but the Iowa will be a buildable unit in D-day, I've already made the vxl for it too.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Wed Aug 10, 2016 1:55 am    Post subject: Reply with quote  Mark this post and the followings unread

Pretty thing, but something this big seems useless for RA2...

LKO can you make us a half sunken (lying sideways) version to use as a building/wreckage?

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Aug 10, 2016 4:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

it was never meant to be used in RA2 Wink

I've uploaded the model. Feel free to create a sunken version yourself.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Aug 11, 2016 7:47 am    Post subject: Reply with quote  Mark this post and the followings unread

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?



iowa_damaged.png
 Description:
 Filesize:  43.12 KB
 Viewed:  9920 Time(s)

iowa_damaged.png



_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Reaperrr
Commander


Joined: 26 Apr 2003
Location: Somewhere in Germany

PostPosted: Thu Aug 11, 2016 9:52 am    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:

I couldn't find a UpgradeOnDamage trait on github.

The wiki is outdated, unfortunately.

For an example, look at the cyborg rules in OpenRA's WIP TS mod:
https://github.com/OpenRA/OpenRA/blob/bleed/mods/ts/rules/defaults.yaml#L397

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
Code:

   UpgradeOnDamage:
      Upgrades: damaged
      ValidDamageStates: Heavy, Critical
   WithFacingSpriteBody:
      UpgradeTypes: damaged
      UpgradeMaxEnabledLevel: 0
   WithFacingSpriteBody@DAMAGED:
      UpgradeTypes: damaged
      UpgradeMinEnabledLevel: 1


Lin Kuei Ominae wrote:
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.

Back to top
View user's profile Send private message Send e-mail
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Thu Aug 11, 2016 10:02 am    Post subject: Reply with quote  Mark this post and the followings unread

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...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Aug 11, 2016 10:31 am    Post subject: Reply with quote  Mark this post and the followings unread

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)
Code:
   WithSpriteTurret@MGRightI:
      Turret: MGRI
      Sequence: turMG
   WithFacingSpriteBody@superstructure:
      Sequence: superstructure
   AutoTarget:


to this
Code:
   WithSpriteTurret@MGRightI:
      Turret: MGRI
      Sequence: turMG
   WithFacingSpriteBody@superstructure:
      UpgradeTypes: damaged
      UpgradeMaxEnabledLevel: 0
      Sequence: superstructure
   WithFacingSpriteBody@superstructure_damaged:
      UpgradeTypes: damaged
      UpgradeMinEnabledLevel: 1
      Sequence: superstructure_damaged
   UpgradeOnDamage:
      Upgrades: damaged
      ValidDamageStates: Heavy, Critical
   WithFacingSpriteBody:
      UpgradeTypes: damaged
      UpgradeMaxEnabledLevel: 0
   WithFacingSpriteBody@DAMAGED:
      UpgradeTypes: damaged
      UpgradeMinEnabledLevel: 1
      Sequence: idle_damaged
   AutoTarget:


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?


here the sequence code
Code:
iowa:
   idle:
      Facings: 32
      ShadowStart: 32
   tur16inA: iowa16iA
      Facings: 32
   tur16inB: iowa16iB
      Facings: 32
   tur5inH: iowa5inH
      Facings: 32
   tur5inL: iowa5inL
      Facings: 32
   turMG: iowaMG
      Facings: 32
   muzzle: gunfire2
      Length: 5
   muzzleMG: minigun
      Length: 6
      Facings: 8
   superstructure: iowa_s
      Facings: 32
      ZOffset: 100
   idle_damaged: iowa_d
      Facings: 32
      ShadowStart: 32
   superstructure_damaged: iowa_sd
      Facings: 32
      ZOffset: 100
   icon: caicon

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Thu Aug 11, 2016 11:16 am    Post subject: Reply with quote  Mark this post and the followings unread

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...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Reaperrr
Commander


Joined: 26 Apr 2003
Location: Somewhere in Germany

PostPosted: Thu Sep 08, 2016 12:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message Send e-mail
NimoStar
Commander


Joined: 07 Nov 2012
Location: Buenos Aires

PostPosted: Tue Jan 10, 2017 2:05 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

_________________

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [14 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

[ Time: 0.1966s ][ Queries: 16 (0.0116s) ][ Debug on ]