• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Need Info] Modelswapping colonists?

Status
Not open for further replies.
Level 27
Joined
Jul 6, 2008
Messages
11,325
Is there any way to safely morph or modelswap colonist units so that you could return them to their original state (same portrait/model/texture they originally were spawned with)? If I modelswap them back into colonists trough actor events it just turns them into a placeholder ball, if I remove their actor and have it replaced by another unit actor, just to recreate previous unit actor, be it trough a behavior or a morph into a different unit, they get a completely different model, texture and portrait. If I just make their previous unit actor hidden trough actor events and attach another unit actor to the unit, once the unit turns back it gets all messed up and unselectable. If instead of creating a new unit actor I create a model actor, while having the original unit actor invisible, the model actor doesn't play any of the movement animations.

So, how do I implement colonist portrait and skin persistency after a model swap? I kinda want to assign the colonists jobs like "miner" or "worker" and make them switch to appropriate models, while maintaining their individuality.
 
Level 27
Joined
Jul 6, 2008
Messages
11,325
You will need to use a behaviour to determine their model (set variation). That way you can create the same variation again for all different models or actor variations.
Oh hey, good idea! I'm a bit confused about execution, do I need to randomly apply one out of multiple behaviors, and then have actor events change the texture and model variations based on which behavior is applied, both upon unit creation and after removal of a "job" behavior?
That sounds doable, erm... Do I need to create new models for each variation of colonist model? No matter which variation I would set in a model swap I would still get just the placeholder ball. Also, I'm bit unfamiliar with colonist texture and model specifics, but can I use two behaviors, one for skin applied and another for model?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Oh hey, good idea! I'm a bit confused about execution, do I need to randomly apply one out of multiple behaviors, and then have actor events change the texture and model variations based on which behavior is applied, both upon unit creation and after removal of a "job" behavior?
Yes. To make the behaviour random so that there is variance you can use a switch effect to add different behaviours, or different amounts of a behaviour, based on a random number.

That sounds doable, erm... Do I need to create new models for each variation of colonist model? No matter which variation I would set in a model swap I would still get just the placeholder ball. Also, I'm bit unfamiliar with colonist texture and model specifics, but can I use two behaviors, one for skin applied and another for model?
I do not know much about colonist next to it is one of the more complex models due to having a base model and extension animation file.
 
Level 4
Joined
Jun 30, 2014
Messages
72
I have some experience with the annoying colonist model (I won't even go into the morph ability, if that's what you're using to transform the unit).
I'm assuming what you're trying to do is to have a unit with a colonist model, that can turn into something else, and change back, without changing back into a different colonist model?
The changing back as a different model variant is something to do with the standard colonist model being more like a list of possible variants, chosen randomly.
I found a work-around for it, which is to go to Models tab in Data, and add a series of models which each have the model file set to one variant of the colonist model. Use these as the models for your transforming colonists, so that the model is a fixed variant instead. That way, the modelswap will always swap back to the same variant of the model.
 
Level 27
Joined
Jul 6, 2008
Messages
11,325
Thanks for feedback guys!
I'm assuming what you're trying to do is to have a unit with a colonist model, that can turn into something else, and change back, without changing back into a different colonist model?
Yeah, exactly! Though I'm thinking of eschewing the morph for just modelswaps/actor swaps and a single unit. Should work great with scientist and other identical animation units, not so much with SCV which would require some extra tweaking with speed and size but, eh, guess it's worth it.

EDIT: Okay, I discovered male colonist variations only differ in that they have backpacks and male miner can use either gender textures so for now I won't apply this system even though it's easy once you get familiar to events, and will instead just have modelswaps to these variations, plus maybe request female colonist with backpack and as miner. Later tiers of gameplay do involve plenty of major upgrades, so I will definitely implement this system once I'll start replacing regular builders with SCVs, miners with HERCs, and such after upgrade research.
 
Last edited:
Status
Not open for further replies.
Top