Question reg. weapon swapping

Modding discussion.
User avatar
Caeltos
Moderator
Posts: 1070
Joined: Sun 03 Feb, 2013 10:49 pm

Question reg. weapon swapping

Postby Caeltos » Thu 27 Feb, 2014 8:33 pm

For our lovely modders & coders out there, I have a quick question that I must ask.

Is it possible to equip units with different weapons given their combat status? For an example of this, let's say if you order a unit to engage in melee, they would swap out their weapons for chainsword + bolt pistol.

- Either at the given command, or if in proximity or engaged in melee-combat
- If out of melee-range, they would still utilize their default equipped weapons
User avatar
Lulgrim
Admin
Posts: 1311
Joined: Sun 03 Feb, 2013 9:44 pm
Location: Grimdark
Contact:

Re: Question reg. weapon swapping

Postby Lulgrim » Thu 27 Feb, 2014 9:02 pm

I suppose it would be "possible" but we can't tell the unit's status very well straight away. Most likely it would bug like hell, swapping weapons incorrectly and getting stuck with the wrong gear, not to mention looking glitchy with stuff just disappearing and changing.
User avatar
Nuclear Arbitor
Level 5
Posts: 1106
Joined: Tue 12 Feb, 2013 2:56 am

Re: Question reg. weapon swapping

Postby Nuclear Arbitor » Thu 27 Feb, 2014 10:01 pm

can you give different weapons/attacks different priorities? idea being that the shortest range attack has highest priority and longest the lowest. the lack of that created issues in wc3.

edit: nm, don't think this would help
Last edited by Nuclear Arbitor on Fri 28 Feb, 2014 3:43 am, edited 1 time in total.
User avatar
ChrisNihilus
Level 3
Posts: 486
Joined: Wed 27 Nov, 2013 10:29 am
Location: Udine, Italy

Re: Question reg. weapon swapping

Postby ChrisNihilus » Thu 27 Feb, 2014 10:44 pm

Catachan Devil switching to Catachan fangs and/or Devil Claws would be very pleasing.
"This quiet... offends... SLAANESH!"
Atlas

Re: Question reg. weapon swapping

Postby Atlas » Fri 28 Feb, 2014 1:09 am

Maybe only switching weapons when you switch their combat stance? Toggling between ranged and melee only?
User avatar
Black Relic
Level 4
Posts: 846
Joined: Mon 29 Jul, 2013 3:05 am
Location: United States
Contact:

Re: Question reg. weapon swapping

Postby Black Relic » Fri 28 Feb, 2014 4:27 am

Might be possible. If you add the requirement, required_combat which asks for the stance. And when in the melee stance it deletes the ranged weapon ( or bolter as an example) and give the squad the bolt pistols and chainswords. And when you switch back it deletes the bolt pistol and sword and gives them their original weapon back. But idk i haven't tried it.

Although I was thinking about this though a good while back. Since there is combat knifes in the game was going to try to have Tacs/Csm pull out combat knives and stab others (as if they would do anything else lol) when in melee.
"...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
Lulgrim
Admin
Posts: 1311
Joined: Sun 03 Feb, 2013 9:44 pm
Location: Grimdark
Contact:

Re: Question reg. weapon swapping

Postby Lulgrim » Fri 28 Feb, 2014 5:31 am

I don't think the idea is realistic with the state of the base game that we have. It would bug into eternity, I guarantee it...
Myrdal
Admin
Posts: 347
Joined: Mon 15 Apr, 2013 1:47 pm

Re: Question reg. weapon swapping

Postby Myrdal » Fri 28 Feb, 2014 1:23 pm

Disaster looms over this one. Worth a shot though, I'll try and do some labbing today.
Arbit
Level 3
Posts: 357
Joined: Tue 28 May, 2013 10:00 pm

Re: Question reg. weapon swapping

Postby Arbit » Fri 28 Feb, 2014 7:21 pm

Tying weapon loadout to stance is clever, but it could be fraught with problems. What happens when something melees a squad in ranged stance? You wouldn't want them to keep shooting, so would the game automatically swap stances? Or would you have them use the punching animation they have now? If melee does less damage when in ranged stance (as I presume it would) you've put an annoying micro burden on the player, because now they'd have to be constantly swapping stances for stuff like tacs/TCSM and other quasi-hybrid melee units, for not much better a reason than "it looks cool". Having the game auto-swap stances would work, but what would happen if you try to change stances while the game is busily changing them? And the way stance changing works now isn't exactly smooth - there's frequently a significant delay before the new stance is "loaded".

Of course, Caeltos might have a new unit in mind where it would work more logically, I dunno.
My 1v1 map - Imperial Plaza. Revisions are in progress so please check it out and give feedback!
Myrdal
Admin
Posts: 347
Joined: Mon 15 Apr, 2013 1:47 pm

Re: Question reg. weapon swapping

Postby Myrdal » Fri 28 Feb, 2014 7:30 pm

Did some minor testing and required_combat as suggested works well when switching from melee to ranged stance. Switching from ranged to melee stance isn't very reliable though, only when using force melee does it work as expected. Will do more testing later.

Arbit wrote:What happens when something melees a squad in ranged stance? You wouldn't want them to keep shooting, so would the game automatically swap stances?

Unit will be forced in melee stance, yes.
User avatar
Dark Riku
Level 5
Posts: 3083
Joined: Sun 03 Feb, 2013 10:48 pm
Location: Belgium

Re: Question reg. weapon swapping

Postby Dark Riku » Fri 28 Feb, 2014 7:45 pm

Arbit wrote:If melee does less damage when in ranged stance (as I presume it would) you've put an annoying micro burden on the player,
It does not. What makes you think it would?
Arbit
Level 3
Posts: 357
Joined: Tue 28 May, 2013 10:00 pm

Re: Question reg. weapon swapping

Postby Arbit » Fri 28 Feb, 2014 10:02 pm

Dark Riku wrote:
Arbit wrote:If melee does less damage when in ranged stance (as I presume it would) you've put an annoying micro burden on the player,
It does not. What makes you think it would?

I was talking about a hypothetical situation where the player has manual control over switching to melee or ranged weapons. I know that's not how the game works now.
My 1v1 map - Imperial Plaza. Revisions are in progress so please check it out and give feedback!
Atlas

Re: Question reg. weapon swapping

Postby Atlas » Fri 28 Feb, 2014 10:04 pm

Well I made a lot of assumptions with my idea since I'm no code monkey.

But basically there's this little button on the command card in the bottom right where your units appear that manually toggles the stance of a unit. So for example, putting a SM melee dread into melee stance means it'll only use its flamer. I'll need to lab it but for now I'll say that it won't start punching things that get into melee.

For Tacs and similar squads I'd imagine that the weapon loadout would ONLY look at what stance is selected in the command card, and not whether the unit is in ranged or melee.

So if you put it to melee stance and the Tacs pull out chainswords and such, it works like a melee unit regardless of range.

If they are in ranged stance though and they're forcing melee/attacked in melee, the card would still read "ranged stance" and they would do their punching stuff.

The motive behind such a change is irrelevant, but I guess you could have a small bonus to ranged units with melee stuff and etc etc

Dunno really why though :/
User avatar
Forestradio
Level 5
Posts: 1157
Joined: Sun 13 Oct, 2013 5:09 pm

Re: Question reg. weapon swapping

Postby Forestradio » Fri 28 Feb, 2014 11:26 pm

Sergeant Tarkus in the Chaos Rising campaign changes from shooting you with a demonic bolter to chopping you with a chainsword if he is the traitor.

Not sure if this helps :/

Return to “Modding”



Who is online

Users browsing this forum: No registered users and 0 guests