Upgrading One Unit into Another. Issues.

Hinte

New Member
Reaction score
4
Yep yep, thanks for your help, while your here o_O do you know anything about dialogues or where i can watch a tutorial?
 

TideHall

New Member
Reaction score
0
I can 100% confirm that the problem that the original poster Hinte reported exists, because I Googled my way onto this forum and this thread while I was searching for a solution to the exact same problem. Some posters earlier in the thread seem to have misunderstood the problem, so let me add a few more details to try to clarify.

There are two units in the game which are made available by an upgrade that uses "Unit Availability Change" as part of "Data - Effect". Those two units are "Siege Engine (Barrage)" and "Troll Berserker". These two units use the same models as, respectively, "Siege Engine" and "Troll Headhunter"; however, they are not the same units and are listed as separate units in the Object Editor under the categories "Human\Melee\Special" and "Orc\Melee\Special" rather than under "Human\Melee\Units" and "Orc\Melee\Units".

If you add these two units to "Techtree - Units Trained" for any building, the icons for two units do not appear on that building within the game (until they are made visible via "Unit Availability Change"), which is exactly as things should be (since they are advanced units and should not appear until the proper upgrade is researched). The problem is, there is no obvious way using the Object Editor to duplicate this behavior of being hidden from the beginning for any other units you want to be considered advanced units.

It's bizarre, because it seems to be behavior unaccounted for by any field within Object Editor or Gameplay Constants. This is the sort of behavior that should be possible to set without any use of triggers, but I can't find any way to do so, and I've spent countless hours testing properties unsuccessfully trying to duplicate the behavior.

On your custom Upgrade have you checked Effect 1 - New Availability for UNAVAILABLE and Effect 2 - New Availability for AVAILABLE?

These settings should fix your problem, concerning your basic unit is you want to disappear and your advanced unit is the one to remain available!

As Hinte already explained, and as I have confirmed, what you're solving here isn't our problem. All this does is make the basic unit's icon disappear and the advanced unit's icon appear -- the latter of which is irrelevant, because the advanced unit's icon is already visible. What we want is a way to make the advanced unit's icon hidden from the beginning, the way "Siege Engine (Barrage)" and "Troll Berserker" are, but there seems to be no way to make any other unit behave like those two.

My current best guess is that the behavior of hiding the icons for those two units is hardcoded into the executable rather than editable by Object Editor, but if so, that's quite an unfortunate failure of design, to "shield" that behavior from modifiability. This is the sort of basic behavior which should be able to be done without triggers.

The only non-trigger workaround to get the icon hidden from the beginning that works is, if you want, for example, a Captain as an advanced unit, to copy either the "Siege Engine (Barrage)" or the "Troll Berserker" unit and then tediously go through every single property of the copied unit and change them to match the corresponding property of the Captain. That's not a good solution, though, because, first, it's extremely time-consuming to do if want to create many advanced units; second, it's very error-prone (you can easily make a mistake while copying hundreds of properties); and third, it makes it impossible to see what customizations you have made to the unit, since you can't tell what properties you have modified from the default (normally, properties that are modified from the default are highlighted in pink rather than black, but since you have to modify almost all the properties of the copied unit to make it a "clone" of whatever unit you want to be advanced, almost all the properties will be highlighted).

If anyone could suggest a solution (and not one of the non-working solutions already suggested earlier in this thread) that doesn't involve triggers, that would be great, and you would have my deep gratitude.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
This thread is 4 years old.
Instead of working on warcraft maps perhaps you should seek out training as a necromancer.
 

TideHall

New Member
Reaction score
0
This thread is 4 years old.
Instead of working on warcraft maps perhaps you should seek out training as a necromancer.

Like I said in my previous post, I came across this thread while I was Googling for a solution to a problem that I am having now. Since this thread is discussing the same problem, it makes sense to use it rather than start a new thread so that it is together with earlier work on the same problem.
 

afisakov

You can change this now in User CP.
Reaction score
37
If anyone could suggest a solution (and not one of the non-working solutions already suggested earlier in this thread) that doesn't involve triggers, that would be great, and you would have my deep gratitude.

Honestly, there is a very simple way to solve this problem with 2 triggers. I am surprised noone thought of it during the original discussion.
Just make both units available for production from the same barracks(or custom variat thereof) and use these 2 triggers
Trigger:
  • inittrig
    • Events
    • Map initialization (or time elapsed 1 sec etc. also works)
    • Conditions
    • Actions
    • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
    • Player - Make captain(upgraded) Unavailable for training/construction by (Picked player)

Trigger:
  • upgrade trig
    • Events
    • Unit - A unit Finishes research
    • Conditions
    • (Researched tech-type) Equal to Sorceress Adept Training
    • Actions
    • Player - Make footman(preupgrade) Unavailable for training/construction by (Owner of (Triggering unit))
    • Player - Make captain(upgraded) Available for training/construction by (Owner of (Triggering unit))


This may not be trigger-free, but should be easy to understand and readily scale-able to however many custom upgradeable unit you wish to make.
 

TideHall

New Member
Reaction score
0
No it doesnt.
Thats why its against the forum rules.

The rules are contradictory. Another rule says:

DO NOT. POST. MULTIPLE THREADS. ASKING. THE. SAME. QUESTION. This will be heavily enforced. Most same-question threads will be deleted.

So it was a choice of either break the rule about multiple threads asking the same question, or breaking the rule about necroing, and the rule about multiple threads asking the same question is the one that is boldfaced and full of caps to emphasize its importance.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
The rules say that you should not make several threads about the same topic. That doesnt mean that 2 people cant make a thread about the same topic if both threads are 4 years apart.
 

TideHall

New Member
Reaction score
0
The rules say that you should not make several threads about the same topic. That doesnt mean that 2 people cant make a thread about the same topic if both threads are 4 years apart.

The rules say that people in general should not make 2 threads about the same topic, and adds for additional emphasis that "This will be heavily enforced. Most same-question threads will be deleted."
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
The point of banning posting in a 4-year old thread is that the original posters (and any responders) are unlikely to still be on the site; hence, your post in the thread is little more than spam. Post a new thread, but don't post 5 asking the same question that someone did 2 days ago.
 

TideHall

New Member
Reaction score
0
Honestly, there is a very simple way to solve this problem with 2 triggers.

Thank you. :)

If anyone can come up with a non-triggered solution, perhaps by finding some obscure property/attribute that can cause icons to be hidden at the beginning of the game, please chime in and tell us about it!
 
Reaction score
9
If anyone can come up with a non-triggered solution, perhaps by finding some obscure property/attribute that can cause icons to be hidden at the beginning of the game, please chime in and tell us about it!
I'll look into that right away, I'll tell you when I found something...
 

TideHall

New Member
Reaction score
0
Trigger:
  • upgrade trig
    • Events
    • Unit - A unit Finishes an upgrade
    • Conditions
    • (Researched tech-type) Equal to Sorceress Adept Training
    • Actions
    • Player - Make footman(preupgrade) Unavailable for training/construction by (Owner of (Triggering unit))
    • Player - Make captain(upgraded) Available for training/construction by (Owner of (Triggering unit))

Minor correction: The above will not work unless the event is changed from
Trigger:
  • Unit - A unit Finishes an upgrade
to
Trigger:
  • Unit - A unit Finishes research
because the "Finishes an upgrade" event is raised for things like town hall upgrading to tier-2 and tier-3 town halls, while the event that is raised for technological completion is "Finishes research".
 

afisakov

You can change this now in User CP.
Reaction score
37
good catch. sorry about that.
Guess I typed it too fast.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top