Jump to content


Photo

Question regarding models and UI


15 replies to this topic

#1 Dextras

Dextras
  • Members
  • 7 posts

Posted 07 November 2018 - 03:18 AM

Hello everyone!

 

My (online) name is Dextras, I'm rather new to Dawn of War, and definitely new to modding in general, but this last two months I've been having a blast experimenting with modding Soulstorm nonetheless. For the most part I've been able to figure out how modding the game works on my own, and with what guides and tutorials remain on the internet, but there are two sticking points that have me rather stuck. Through talking with Gambit back at ModDB, he pointed me to this forum, and encouraged me to ask around here, so here I am!

 

The mod I've been working consists on introducing the Chaos Daemons and Inquisition Daemonhunters as playable (and CPU controlled) races to the single player campaign of Soulstorm. Surprisingly enough, I was able to do it (well, the Chaos Daemons for now, the Inquisition still has some work left)! The two roadblocks I've encountered don't pose an essential obstacle to the mod, but solving them could make it so much more polished that I'm trying my best to figure them out. Specifically, they are: how to introduce cameras to 3d models, and how to edit the UI overlay of the metamap.

 

Using cameras in 3d models:

 

This is something I came across after I made two custom models of the Chaos Daemon Lord to be displayed in the race selection screen and in the wargear screen of the campaign. The models worked as well as it could be expected, but one thing I noticed is that the camera wasn't as zoomed in as was the case with the corresponding models of the original 9 races included in Soulstorm. So, I went checking in the logs and found that, sure enough, my model had a line with: "Missing camera 'wargear_unit_center'!" I tried to see if adding a camera object with that name in 3DS Max would be enough, but unfortunately, it doesn't seem to be the case. By doing that I have managed to make my custom camera appear in the Object Editor when viewing my model, but the game still doesn't seem to recognize it. I'm guessing (or rather, hoping) that I must be missing some simple step along the way. Maybe adding a custom user defined property to the camera in 3DS Max, or something like that, but since I haven't been able to found any reference to that regarding DOW online, I'm kinda stuck at the moment. Does anyone know how it might be achieved, or perhaps have an idea of where I could look for more information on the matter?

 

Editing the UI overlay of the metamap screen:

 

This is an unrelated doubt I have. I've been attempting to do some minor changes to the UI that's overlaid on top of the territories in the metamap screen of the single player campaign. Nothing major, I mostly want to find a way to give the races I introduce to the campaign a custom symbol to represent their army while viewing the metamap. Since then, what I've gathered is that this overlay is handled by the different .gfx files located in "Data\art\ui\swf". These seem to basically be .swf files with some extended functionality (I'm guessing that what scaleform was used for, but I've no idea), and these in turn are published flash files with some light actionscript code in them to handle basic events. As such, to edit them I would need the original .fla files which, as you might expect, I don't have. I've tried several flash decompilers, and while some are able to extract most of the file, none do a flawless job. They all fail to extract some parts, which coincidentally seem to correspond with the parts that would handle the runtime loading of images. Anyways, the result is that if I want to edit them, I can't simply modify the part I'm interested in, I would have to almost recreate the entire file from scratch! Which is not only very time consuming, I'm also not sure I'd be able to do it with my limited knowledge of flash. So I guess what I'm trying to ask is whether someone has attempted or succeeded in editing this. Also, any advice you may impart to me would be greatly appreciated, as I'm mostly improvising with this, ha!

 

 

So that's the story! Any help you might give me will be greatly appreciated and, of course, let me know if there is any part where I may not have been clear enough, I tend to get a bit wordy when writing online, ha! Also, congratulations on your work! Both the amount and quality of mods available to this game had me absolutely impressed when I started digging around online in search of resources.

 

Cheers!

 

 



#2 Kasrkin84

Kasrkin84
  • Members
  • 201 posts
  • Location:Birmingham, UK
  • Projects:Strongholds, Unification

Posted 07 November 2018 - 11:49 AM

You can swap out the race icons on the metamap simply by replacing the relevant texture files - however, whether this will work for non-vanilla factions is another question. I assume you're removing two other factions from the campaign in order to accommodate Daemons and Daemonhunters?



#3 Dextras

Dextras
  • Members
  • 7 posts

Posted 07 November 2018 - 05:29 PM

Thanks for the reply!

 

I'm not replacing some of the original races, I'm adding the new factions on top of them, so I'm afraid I can't reuse the original textures.

 

Cheers.



#4 Kasrkin84

Kasrkin84
  • Members
  • 201 posts
  • Location:Birmingham, UK
  • Projects:Strongholds, Unification

Posted 07 November 2018 - 08:38 PM

Ah, in that case I'd say you're probably screwed. There's not a whole lot that can be done with the metamap in general due to it being wrapped up in that un-moddable Scaleform mess.

 

Most of the icons in "data/art/ui/swf/icons" are fairly intuitively named, so maybe you could just name them using the same sort of format as the vanilla ones and be fine. However, there are some icons in "data/art/ui/swf" that are named things like "metamap292.dds" for example that are race-specific but clearly hardcoded. Also there's other things like the wargear screen backgrounds that appear to have the same issue.



#5 Dextras

Dextras
  • Members
  • 7 posts

Posted 07 November 2018 - 09:56 PM

Yeah, I was afraid that might be the case.

 

Just to confirm your suspicions, you are correct. All the images that have intuitive names and are located in the "data/art/ui/swf/icons" folder are dynamically loaded at runtime and don't seem to be handled by scaleform (or the engine, or whatever is responsible). I think the logic of that is handled by some of the actionscript located in the corresponding flash files. By adding the appropriate images following the same naming conventions the developers used, I've been able to introduce all the images and icons I needed. All except for the one used to represent the army in the metamap. This one is, unfortunately, one of the "metamapxxx.dds" textures that you mention.

 

The wargear screen, luckily, can be customized. You just need to change the corresponding field in the appropriate .race file and the game will use whatever image you point to there.

 

Anyways, I guess I'll either have to live with the fact that I may need to either remember where the new races armies are, or manually check the territories. Not the worst, but not the best either. Just out of stubbornness, I'll keep trying to see if I can maybe create new .gfx files from scratch that do not rely on scaleform. I'll let you know if I succeed.

 

Thanks for clearing that up! You wouldn't happen to also know your way around 3DS Max and the Object Editor, by chance, would you  :grin: ? And introducing custom cameras and the like?

 

Thanks for your replies,

 

Cheers!



#6 Kasrkin84

Kasrkin84
  • Members
  • 201 posts
  • Location:Birmingham, UK
  • Projects:Strongholds, Unification

Posted 07 November 2018 - 10:39 PM

The wargear screen, luckily, can be customized. You just need to change the corresponding field in the appropriate .race file and the game will use whatever image you point to there.

 

Oh yeah, forgot about that. Well that's something.

 

Talking of which though, although you can set the territory colour in the .race file, you can't set the territory boundary colour. Or it's the other way around. I forget. Definitely one or the other though, and it seems to be hardcoded.

 

You wouldn't happen to also know your way around 3DS Max and the Object Editor, by chance, would you   :grin: ? And introducing custom cameras and the like?

 

Sadly not. An understanding of 3DS Max has always eluded me. I did use the Object Editor quite a bit several years back (I was swapping out the Tau Commander in the Dark Crusade campaign for the XV89 version - the OE was required to get all the wargear upgrades to work correctly with the campaign), but I've basically forgotten pretty much all of that now and can't get the OE working anymore anyway.

 

I'd suggest talking to Miros (not sure if he's on Revora, but you can catch him on ModDB). I understand he's done some work in this general area of adding factions to the campaign.


Edited by Kasrkin84, 07 November 2018 - 10:40 PM.


#7 Dextras

Dextras
  • Members
  • 7 posts

Posted 07 November 2018 - 11:03 PM

 

 

Talking of which though, although you can set the territory colour in the .race file, you can't set the territory boundary colour

 

Yeah, that's the case. Each territory in the metamap is actually a 3D model, and the different boundaries are just different textures that are hidden / made visible depending of the race that owns it. Not only that, but the dashed boundary line that is used when the territory isn't connected to the owner's stronghold is a different texture as well! Editing those is not something I'm looking forward to... I'm hoping 3DS will have some sort of batch tool or similar because otherwise it's going to be painfully tedious.

 

The colour specified in the .race file I don't know if it's used anywhere. I think it might be used when you click on the little button in the lower left corner of the metamap screen and switch views to that particular one where territories are fully "painted" according to the faction controlling it, but I haven't tested it.

 

 

 

I'd suggest talking to Miros

 

Thanks for the suggestion, will do! Do you happen to know if "Miros" is his username there, I'm having a bit of trouble finding him.

 

Cheers!



#8 Kasrkin84

Kasrkin84
  • Members
  • 201 posts
  • Location:Birmingham, UK
  • Projects:Strongholds, Unification

Posted 07 November 2018 - 11:09 PM

The colour specified in the .race file I don't know if it's used anywhere. I think it might be used when you click on the little button in the lower left corner of the metamap screen and switch views to that particular one where territories are fully "painted" according to the faction controlling it, but I haven't tested it.

 

That's exactly what it's used for.

 

Do you happen to know if "Miros" is his username there, I'm having a bit of trouble finding him.

 

https://www.moddb.com/members/miros


Edited by Kasrkin84, 07 November 2018 - 11:09 PM.


#9 Dextras

Dextras
  • Members
  • 7 posts

Posted 07 November 2018 - 11:22 PM

You are a Saint! Thanks a ton.



#10 Miros

Miros
  • Members
  • 17 posts

Posted 08 November 2018 - 07:47 PM

Oh howdy! :D

#11 Kasrkin84

Kasrkin84
  • Members
  • 201 posts
  • Location:Birmingham, UK
  • Projects:Strongholds, Unification

Posted 08 November 2018 - 11:35 PM

Speak of the devil...



#12 ultiraweirdo

ultiraweirdo
  • Members
  • 22 posts

Posted 25 November 2018 - 02:18 PM

Welcome Dextras!

 

Just curious, how did you come across Dawn of War? 



#13 Dextras

Dextras
  • Members
  • 7 posts

Posted 27 November 2018 - 04:25 AM

Hey ultiraweirdo, thanks for the welcome!

 

Well, through YouTube, funnily enough. I came across a video of a retro review of the game, thought it looked great, so I searched for a bit of gameplay videos and immediately realized I would love it. Seeing some of the custom skirmishes players could set up with the huge amount of mods that were available was the icing on the cake.

 

A bit late to the party, I know, but not uncharacteristic of me :)

 

As a sidenote, I should take advantage of this post to briefly update the original topic of the thread. Unfortunately, I have barely had the opportunity to spend time on the game since last time I was here, so I still have not come across a solution to the .gfx files editing.

 

I have, however, solved the whole deal with the cameras. This was entirely thanks to Kekoulis help, so all credit to him, of course. Just in case someone else finds himself in the future having my same question, I figure I might as well give a very quick summary here so the knowledge doesn't idly seat in my personal messages.

 

The short of it is that the game expects three cameras:

  • "wargear_cam": This camera seems to be used for the race selection screen
  • "wargear_unit_center": This camera seems to be used for the wargear selection screen
  • "commander_cam": This one, in the commander screen

Adding them is simply a matter of placing them in the appropriate position in 3DS Max with the appropriate name. No other parameter aside from its position, orientation and FOW seems to matter. That being said, the cameras need to be added to every animation that is to be called on the respective screen, otherwise the camera view snaps. I also think that they need to be added to each "vis_" .max file as well, but I haven't tested it.

 

Doing all of the above, however, doesn't seem to be guarantee that they will work. For reasons that are known only to the engine, on some models that procedure will yield results, and on some others it simply won't work. In that case, the best solution is to just move the entire model in the editor by some offset to give the illusion of a custom POV.

 

Additionally, and I don't know if this quirk was a result of my own inexperience with 3DS Max or what but, the game doesn't appear to respect the FOW you assign to the cameras. When I experimented with it, the camera's POV in game was always about 30 points greater than in 3DS Max.

 

Anyways, if I figure out some more I'll keep the thread updated to document whatever I learn.

 

Cheers everyone, and nice meeting you ultiraweirdo!



#14 ultiraweirdo

ultiraweirdo
  • Members
  • 22 posts

Posted 28 November 2018 - 02:07 AM

Hey ultiraweirdo, thanks for the welcome!

 

Well, through YouTube, funnily enough. I came across a video of a retro review of the game, thought it looked great, so I searched for a bit of gameplay videos and immediately realized I would love it. Seeing some of the custom skirmishes players could set up with the huge amount of mods that were available was the icing on the cake.

 

A bit late to the party, I know, but not uncharacteristic of me :)

 

Nice. I guess you were already an RTS fan?

 

Very late, haha, but the strategy genre has declined so much :sad:  so everyone is sticking to the old greats


Edited by ultiraweirdo, 28 November 2018 - 02:09 AM.


#15 Dextras

Dextras
  • Members
  • 7 posts

Posted 29 November 2018 - 03:29 AM

 

 

Nice. I guess you were already an RTS fan?

 

That's right! RTS and RPGs constitute most of my gaming history, so this was a great find.

 

 

 

but the strategy genre has declined so much

 

True. You can't imagine (or most likely, you can) how disappointed I was after finishing the game, learning that the series had gotten two sequels, and later that neither of them were "traditional" RTS. Whatever their merits might be (and I'm sure that they are pretty good games on their own right), being able to build structures and the macro aspect of the gameplay are part of what I enjoy the most of these games.

 

Luckily for me, the benefit of having such a big backlog of games past that I haven't played yet means I'm always discovering gems like this :D

 

Cheers!



#16 ultiraweirdo

ultiraweirdo
  • Members
  • 22 posts

Posted 29 November 2018 - 07:25 AM

 

 

 

Nice. I guess you were already an RTS fan?

 

That's right! RTS and RPGs constitute most of my gaming history, so this was a great find.

 

 

 

but the strategy genre has declined so much

 

True. You can't imagine (or most likely, you can) how disappointed I was after finishing the game, learning that the series had gotten two sequels, and later that neither of them were "traditional" RTS. Whatever their merits might be (and I'm sure that they are pretty good games on their own right), being able to build structures and the macro aspect of the gameplay are part of what I enjoy the most of these games.

 

Luckily for me, the benefit of having such a big backlog of games past that I haven't played yet means I'm always discovering gems like this :D

 

Cheers!

 

 

 

Yeah, DoW 3 was such a letdown

 

I like to play Sword of the Stars. It's 4X + RTS. Both the 4X and RTS aspects are watered down somewhat, but together they make a great game





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users