Modding Quick Questions

Modding discussion.
PlummusDucis
Level 0
Posts: 4
Joined: Thu 07 Jan, 2016 5:26 pm

Modding Quick Questions

Postby PlummusDucis » Fri 08 Jan, 2016 8:51 pm

Hi all

I've been modding all sorts of games for many years, even with some popular mods currently in the Steam Workshop. Since we all love DoW2, I've been trying to vamp up the campaign for a while for a friend and I to privately enjoy (though I put my mod on hiatus for a few months until now due to this "real world" thing everyone keeps mentioning). As everyone who's dug around a bit in the engine knows - it is very hard to find your way at first, there isn't a great deal of documentation available and quite often you just reach an impasse where you have no idea how to do a certain feature, or even if a certain feature can be done. I have reached such a dead-end many times and thought that the most experienced and active DoW2 modding group around must be able to help - yet felt embarrassed creating a new thread for every minor problem.

Ergo, I thought it would be more polite to start a thread for quick questions where everybody can help anybody out there snagged up in their modding projects. Similar threads in other game forums have helped me greatly in the past, and since the official Relic forum is a wasteland, here seems a good place to have one.

Admins feel free to delete this thread if you wish. I understand it's not *strictly* Elite-related and therefore might violate some posting rules, and maybe the Elite community is to small anyway to warrant a thread like this, but hey no harm in trying. I'll be posting my own questions in here too. :)
PlummusDucis
Level 0
Posts: 4
Joined: Thu 07 Jan, 2016 5:26 pm

Re: Modding Quick Questions

Postby PlummusDucis » Fri 08 Jan, 2016 9:32 pm

  1. Is it possible to make a piece of campaign wargear give a certain item if recycled by a particular squad, otherwise just normally grant xp? I'm trying to make Terminator Assault Cannons and Dreadnought Assault Cannons usable by both terminators and Thule - and after experimenting with different ways to do this, I think the best way is to make Terminator ACs, when recycled by Thule, become a Dreadnought AC version of the wargear, and when a Dreadnought AC is recycled by any other squad it becomes a normal Terminator AC again. However, though I can get it to switch fine if I set it to convert when recycled by every squad, I can't seem to get it to normally recycle unless recycled by a pparticular squad; even after deleting all but one of the squads from expendable_actions/award_wargear_expend_action/squads/. I could make it recycle to a generic experience-granting accessory for the other squads, make assault cannons unrecyclable into xp, or make the conversion process from Termie AC to Dread AC one-way (though obviously they aren't preferable solutions). Any advice would be appreciated, even just confirmation that it's impossible as it seems to be.
  2. I switched a heavy bolter wargear's render model to a Chaos autocannon yet it makes no sound when firing. I'm missing something simple here, but what? Similarly when allowing squads to use grenade launchers/shotguns/sniper rifles and other weapons they aren't supposed to use, when equipping the wargear it shows them firing it like a bolter. They use the weapons normally when deployed and so it doesn't affect gameplay at all, but it is rather distracting and if there's a quick fix anybody knows for that, presumably a similar fix the to autocannon-making-no-sound problem, then that'll be appreciated. Probably going to have to copy/paste some animations somewhere but not too sure where to look.
  3. Trying to find out how to do certain effects. Is it possible to make an item reduce health or energy on equip? Or even lower your skills? I've tried the obvious of putting a negative value in on_equip_buffs/max_health/amount but it doesn't seem to work for health and energy like it does damage resistance, speed and armour. Any solution? Same with lowering or even completely turning off health regen... I just don't know how to do it and have even tried to deal 1 point of damage every 10 seconds so the regen when out of combat doesn't kick in but it doesn't work.

That's all my questions for now. I'm pretty sure that it is impossible to do some of this stuff but still thought it best to ask before completely giving up on these features. Comment here or private message me if you have any advice thanks. :)
User avatar
Wise Windu
Moderator
Posts: 1190
Joined: Sat 14 Sep, 2013 2:22 am

Re: Modding Quick Questions

Postby Wise Windu » Fri 08 Jan, 2016 11:24 pm

PlummusDucis wrote:I switched a heavy bolter wargear's render model to a Chaos autocannon yet it makes no sound when firing. I'm missing something simple here, but what?
You'll have to change how the weapon works as well, or just switch the weapon the unit has equipped to the one that goes with the model normally. By switching only the model, the weapon remains the same, which means it keeps the same rate of fire, fx, and other things. The rate of fire and weapon firing pattern specifically have caused weapon sounds to bug out in Elite in the past, but the fx could also cause problems or just look weird.

PlummusDucis wrote:Similarly when allowing squads to use grenade launchers/shotguns/sniper rifles and other weapons they aren't supposed to use, when equipping the wargear it shows them firing it like a bolter. They use the weapons normally when deployed and so it doesn't affect gameplay at all
It's probably because the model you're giving the weapon to doesn't have an animation to go with the grenade launchers. And unfortunately, it isn't as simple as copy and pasting animations. New animations would have to be made because just pasting them somewhere else would likely bug them out due to the models using different skeletons.

If you look in the weapon .rbf file and go to the anim_table, you'll see the animation the weapon uses. With grenade launcher, for example, a heretic will use it like a grenade launcher. In the anim_table, the animation is range_weapon_state. If you look at a CSM bolter, you'll see that the animation in the anim_table is also range_weapon_state. They'll use it like a bolter because the animation path is telling them to, and they don't have an animation for grenade launchers.

PlummusDucis wrote:Trying to find out how to do certain effects. Is it possible to make an item reduce health or energy on equip? Or even lower your skills? I've tried the obvious of putting a negative value in on_equip_buffs/max_health/amount but it doesn't seem to work for health and energy like it does damage resistance, speed and armour. Any solution? Same with lowering or even completely turning off health regen... I just don't know how to do it and have even tried to deal 1 point of damage every 10 seconds so the regen when out of combat doesn't kick in but it doesn't work.
Use the on_equip_entity_actions to grant an apply_modifier_action. Check the "csm_arm_all_reward_legendary" wargear for an example.

Hopefully some of this helps. Welcome to the forums :)
PlummusDucis
Level 0
Posts: 4
Joined: Thu 07 Jan, 2016 5:26 pm

Re: Modding Quick Questions

Postby PlummusDucis » Thu 11 Feb, 2016 6:45 am

I switched all the weapon data. I even tried to just set the wargear weapon to csm_autocannon_csm to see if that would work and it still doesn't have any sounds hahaha

However your other advice has helped a treat, Windu. Thanks!

At the moment I'm having trouble extracting Retribution's RB2 though in order to import some abilities from that over into Chaos Rising. I've used Cope's RB2 extractor v1.21 and made sure to check the box so it converts the rbfs into pre-Retribution format but they still won't open in anything. I can't read them in Cope's Toolbox or convert them to txt using Corsix's tools but get this error thrown up with all of them...

Code: Select all

Converting RBF to text...
Fatal exception:
.\main.cpp:101 - Cannot load input RBF
.\rbf_attrib.cpp:99 - Error reading RBF data
.\file.cpp:499 - Unable to read all items from file

I've even tried loading it as a Retribution file, and re-extracting it in Retribution format rbfs and then loading that as a Retribution file etc. etc. I haven't changed anything in the files and I highly doubt these popular modding tools could've messed up the exporting. The data's all there but I can't efficiently work with it through a hex editor.

I imagine this must be a common problem with an easy fix (fingers crossed?)
User avatar
Wise Windu
Moderator
Posts: 1190
Joined: Sat 14 Sep, 2013 2:22 am

Re: Modding Quick Questions

Postby Wise Windu » Tue 23 Feb, 2016 2:32 am

Not really familiar with the RB2s to be honest. If you send me the files, I can try to look at them when I have time. Same for the autocannon; not sure what would be causing it without seeing the file.
PlummusDucis
Level 0
Posts: 4
Joined: Thu 07 Jan, 2016 5:26 pm

Re: Modding Quick Questions

Postby PlummusDucis » Mon 21 Mar, 2016 6:11 am

Dw about it, fixed the problem. Just had to hunt around for some different tools but opened the files eventually. :)

Currently I'm having problems with filter_action and equip_wargear_action.

I'm trying to re-equip the tacs with a redshirt version of whatever Tarkus is carrying when he has Sternguard unlocked. I tried at first to do this with wargear lists but that was inelegant and there were too many entries so it just didn't work. So I decided to experiment with filter_action and equip_wargear_action instead. Following the examples in the pvp for using upgrades to re-equip characters, I've tried to make one of the tacs (Larry) just spawn with a plasma cannon as a test.

In the filter_action I've set the entity_type to Larry's ebps and the squad_type to Tarkus' sbps and it didn't work. Larry didn't trundle out of the drop pod with a plasma cannon.

Upon checking apply_to_future_units just to experiment, I found that once more Larry didn't appear with a plasma cannon, but when he died and respawned, Tarkus was given a plasma cannon. Which ofc wasn't what I was hoping for.

Any tips? Or is what I'm trying to do plain impossible?

EDIT:

I was testing the equip_wargear_action from the LC's grenade launcher upgrade to see if that works. Did everything right - made sure the wargear was set to no_leader and apply to all squad members etc. etc. and it didn't work. I tried it again with a delay, didn't work. Tried it again by making an ability based on the ability that grants energy at mission start but that didn't work. Little stuck, but it must be possible.

equip_wargear_action wouldn't be optimal anyway as ideally I'd like to assign different wargear to the different squadmates, but I'm willing to go with it as long as I can actually get it functioning.
Myrdal
Admin
Posts: 347
Joined: Mon 15 Apr, 2013 1:47 pm

Re: Modding Quick Questions

Postby Myrdal » Mon 21 Mar, 2016 9:20 pm

Post the rbf file here and we can perhaps help you.
User avatar
Black Relic
Level 4
Posts: 846
Joined: Mon 29 Jul, 2013 3:05 am
Location: United States
Contact:

Re: Modding Quick Questions

Postby Black Relic » Sat 26 Mar, 2016 4:00 am

I have a few questions as well and i don't want to makes another thread.

First: Is there a way to make squads retreat to the closest retreat point rather than the one that is activated?

Second: Is there a way to make the VP countdown be affected by a modifier? An example being You create a building and it increases the VP tick rate of its lowers the tick rate.

Third: I hope I can explain this one well enough. So as some might know i am going to introduce "territory" as a "resource" in my mod And territory is produces by points a player captures. I want to know if the following is possible. If two or more territories collided the collision be split between the two evenly. For example. There are two points each owned by a separate team. Both produce an area of territory of 50 but the two overlap. When this happens the territory that overlaps with the other point is shared so in the direction toward the enemy point (and vice versa) the territory is 25. My goal is to make the points "link together" if points owned by the same team are within a radius and that increases that radius. Then a sneaky player can cut of the link by decapping a point somewhere in between a cluster of points blablablabla.

Fourth: Create a another type of cover. I found that water is technically difficult cover type while in some rbf. And I always wanted to add a negative cover type and using in the maps i make to inspire some caution into a player when he decides to go through it.

Fifth: Allowing multiple units in a single "window" at a building. I want some windows to be able to hold like 2 models (and 3 for more of the swarmy races) so buildings become a bit more beneficial to more high model count races.

Sixth: This one is stupid but, is there a freaking way to remove UCS numbers like 12000012??? I have a few of those and every time i make a tooltip i have to manually set the number since I messed up. Even if i delete the UCS number it still defaults to the number after it. Annoying as hell.


Ill have more later on. 'Till then.
"...With every strike of his sword, with every word of his speech, does he reaffirm the ideals of our honored master..." -From the Teachings of Roboute Guilliman as laid down in the Apocrypha of Skaros. Space Marines Codex pg. 54
User avatar
Dark Riku
Level 5
Posts: 3083
Joined: Sun 03 Feb, 2013 10:48 pm
Location: Belgium

Re: Modding Quick Questions

Postby Dark Riku » Sun 27 Mar, 2016 12:38 am

Black Relic wrote:First: Is there a way to make squads retreat to the closest retreat point rather than the one that is activated?
You mean the other way around? because that is how it works already.
Black Relic wrote:Second: Is there a way to make the VP countdown be affected by a modifier? An example being You create a building and it increases the VP tick rate of its lowers the tick rate.
IIRC, you can set the tick speed to whatever you want.

The rest is up to someone else :)
User avatar
Wise Windu
Moderator
Posts: 1190
Joined: Sat 14 Sep, 2013 2:22 am

Re: Modding Quick Questions

Postby Wise Windu » Sun 27 Mar, 2016 12:55 am

Not sure about the VP thing. Might be possible through SCAR, but not sure. There are SCAR functions like "Player_GetNumVictoryPoints", "Setup_GetVictoryPointTickerOption", and "World_GetNumVictoryPoints" but not sure what they actually do or what you could make them do.

Not sure about the third. I assume SCAR, if anything.

The fourth: I've never tried it, but you might be able to add cover types to the tuning_info.rbf in the cover section. But if that ends up working, you'd also have to add the new type of cover to the ebps file of every unit that uses cover, and to every weapon_family and damage type.

Five: Not sure, but if it's anywhere, it'll probably be in ebps\world_objects\whatever_folder\whatever_file.rbf and then in hold_ext

You can just delete the UCS value in the rbf file if you don't want anything to show up.
User avatar
Black Relic
Level 4
Posts: 846
Joined: Mon 29 Jul, 2013 3:05 am
Location: United States
Contact:

Re: Modding Quick Questions

Postby Black Relic » Sun 27 Mar, 2016 8:21 am

Dark Riku wrote:
Black Relic wrote:First: Is there a way to make squads retreat to the closest retreat point rather than the one that is activated?
You mean the other way around? because that is how it works already.


The crazy thing is that it doesn't work like that actually. Since the maps are going to be so large in my mod i made forward bases where a player can build a small base and they can retreat to it. ATM if a retreat beacon is activated squads will only retreat to that specific point (unless you are near the HQ) rather than the closer retreat point. Might just make all these points HQ type of something so units will automatically retreat there. That would also free some space up for another building which would be nice.

Well i want the tick rate to stay the same until a player has a certain building and has like a 3 Vp cap against him. Then this building acts as a VP itself unless that requirement isn't met.

@ wise.

Not what i mean. As you know when you go into the UCS file to type a tooltip it default to the next number. Mine defaults to a number that that's in the 120000's and i want it to stop. Sadly it won't and it makes me angry.

For that territory thing. I think imma just have like a modifier that offsets itself if a unit is in friendly and enemy territory at the same time. So its like a neutral affect. Sadly this also mean my future attempt at making it show up on the mini map null in void since it cannot happen if I do it like that.
"...With every strike of his sword, with every word of his speech, does he reaffirm the ideals of our honored master..." -From the Teachings of Roboute Guilliman as laid down in the Apocrypha of Skaros. Space Marines Codex pg. 54
User avatar
Wise Windu
Moderator
Posts: 1190
Joined: Sat 14 Sep, 2013 2:22 am

Re: Modding Quick Questions

Postby Wise Windu » Sun 27 Mar, 2016 1:55 pm

Black Relic wrote:@ wise.

Not what i mean. As you know when you go into the UCS file to type a tooltip it default to the next number. Mine defaults to a number that that's in the 120000's and i want it to stop. Sadly it won't and it makes me angry.
I'm not actually sure what you mean. The tooltip file doesn't force me to use the next number. You can type any number above your Base Index. Do you want to change the UCS values you can use in the UCS file? The UCS index is chosen when you create the mod in Cope's, but you can change the base value in the .module file next to UCSBaseIndex.
User avatar
Dark Riku
Level 5
Posts: 3083
Joined: Sun 03 Feb, 2013 10:48 pm
Location: Belgium

Re: Modding Quick Questions

Postby Dark Riku » Sun 27 Mar, 2016 4:52 pm

Black Relic wrote:The crazy thing is that it doesn't work like that actually.
I'm 100% sure it does work like that. I've used that "trick" many times already. When you are getting out of base and there is a retreat point near the frontline, all you do is make sure you're closer to that one and hit retreat to get to the fighting faster.
User avatar
Black Relic
Level 4
Posts: 846
Joined: Mon 29 Jul, 2013 3:05 am
Location: United States
Contact:

Re: Modding Quick Questions

Postby Black Relic » Sun 27 Mar, 2016 5:33 pm

My mods UCS default base value started at 1100000. However after i made a few mistakes making some UCS numbers be in the 1200000's the tooltip default to those numbers and I have to manually change some tooltip values to be in the 1100000's. Id have to show you probably since explaining isnt something im doing well at.

Riku i mean if you have like a Land raider and a beacon at the same time. Your army will retreat to the one that the retreat beacon is activated. I want something that sometimes makes unit retreat to the nearest retreat point even if its not activated. And then when another point beacon is activated the retreat target is that activated beacon and everything else is ignored. If I try to make all these buildings be like an HQ works then my hope wont work since they will retreat to the nearest "HQ" and that removes some play in the mod.

So want I am wanting to try and make is have units default to the closest retreat point when no beacon is activated. But ignore that point to go to a beacon that is activated.

Ill try and make a video or something so people can understand want I mean and maybe understand why I want this soooo much.
"...With every strike of his sword, with every word of his speech, does he reaffirm the ideals of our honored master..." -From the Teachings of Roboute Guilliman as laid down in the Apocrypha of Skaros. Space Marines Codex pg. 54
User avatar
Dark Riku
Level 5
Posts: 3083
Joined: Sun 03 Feb, 2013 10:48 pm
Location: Belgium

Re: Modding Quick Questions

Postby Dark Riku » Sun 27 Mar, 2016 6:16 pm

Black Relic wrote:Riku i mean if you have like a Land raider and a beacon at the same time. Your army will retreat to the one that the retreat beacon is activated. I want something that sometimes makes unit retreat to the nearest retreat point even if its not activated.
Oh ok, gotcha. Yeah, that's different, dunno :p
User avatar
Wise Windu
Moderator
Posts: 1190
Joined: Sat 14 Sep, 2013 2:22 am

Re: Modding Quick Questions

Postby Wise Windu » Sun 27 Mar, 2016 6:51 pm

Black Relic wrote:My mods UCS default base value started at 1100000. However after i made a few mistakes making some UCS numbers be in the 1200000's the tooltip default to those numbers and I have to manually change some tooltip values to be in the 1100000's. Id have to show you probably since explaining isnt something im doing well at.
Yeah, if you could show me what the problem is it might be easier for me to visualize.

Return to “Modding”



Who is online

Users browsing this forum: No registered users and 0 guests