• 🏆 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!

Tech Problems

Status
Not open for further replies.
Level 6
Joined
Dec 8, 2009
Messages
179
Hey dear hive members,

I had the Idea of a tech system relating to each City.
This special tech system should do following:

-Each City has got his own Tier mainbuilding (that's not the Problem)
-All Buildings should have their Tech's related to the Tier of the mainbuilding of that specific Town.
-Unit Upgreades should refer to the researches in the City in which they got trained (so if I got 'Steel Swords' in 'City A' only Footmen in 'City A' will get this upgreade and if I train Footmen in 'City B' they woun't get this upgreade until it has been researched in 'City B')
-Shouldn't be that like 1 player controls several players Units

EDIT:
maybe following Point isn't that clear in my before description of the Problem:
-If in CITY A I've researched 'Steel Swords' all other Cities will still have this upgreade availeable to research until I researched it there too.


Would be really cool if someone could help me and if you're interested you could have a look at this link: http://www.hiveworkshop.com/forums/project-recruitment-256/all-around-recruitment-165825/
 
Last edited:
The upgrades are global, as you know. The only way to achieve that would be running upgrades with no effect and add item abilities to boost the nearby units' stats. You would also need a trigger to check when a unit is trained and if that unit is trained within what city. You can generally give it a try with Custom Values (if you won't use them in the map), so that, up to the number of city, the units will receive their special Custom value (call it "id"). So, a Footman with Custom value 2 comes from City 2.
It needs some work to do it.
 
Level 5
Joined
May 27, 2007
Messages
162
What you're wanting to do is extremely difficult...

A long winded way I can think of, is creating a lot of units in the Object Editor, and making specific City's all train their own brand... Use the Editor 'Suffix' to distinguish between them... Then you have to create a myriad of upgrades applicable to each of the units...

So, Swordsman [City A], will only be affected by Steel Swords [City A] and Mithril Plating [City A]. So if you were to upgraded Steel Swords [City A], a different unit Swordsman [City B] would not have been affected by it.

You could just copy and paste the upgrades/units, being careful to distinguish them from each other. Then adjust the unit's accordingly. Would be a lot of work.

I think Pharaoh's method of using the Custom Value of a unit to distinguish which city it came from, and then (if I understand correctly) give all units an inventory, make dummy upgrades (with no effect), and if you upgrade say, Steel Swords, all unit's will get the Steel Swords Item, which - through triggers - will only affect the 'Custom Value' equal to the City 'custom value' you upgraded it from. I think this will limit you to a possible of 6 upgrades per unit type. Would work a lot neater than my 'simpler' version.

Let us know how you get on.
 
Level 6
Joined
Dec 8, 2009
Messages
179
OK first of all thanks to bouth of you^^

@Cardinian: I hab the same Idea as you but noticed that it would be an enomous number of Units upgreades ect. (like for every of the 6-7 races 22 Units and like 10-15 upgreades for lets say 8-12 Cities (6*(22+10)*8=1536) 0.0 this is really much too much.^^

@Pharaoh_: I thought I would have to do it with Triggers but I don't get how you mean I should do it.
I understood that:
-upgreades would still be global but don't have any effect;
-Units are getting the upgreade bonus only when they are near the city they got trained in and not when they stand in front or a bit away of it;
-Costum Values is not bad at all.... I first have to get an Idea if it doesn't interrupt my troop system I plan;
 
-upgreades would still be global but don't have any effect;
Yes.

-Units are getting the upgreade bonus only when they are near the city they got trained in and not when they stand in front or a bit away of it;
No. You would have to do something like this:
  • Trigger1
  • Events
    • Unit - A unit finishes an upgrade
  • Conditions
    • (Researched tech-type) Equal to X
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit)) matching ((Custom value of (Matching unit)) Equal to (Custom value of (Triggering unit)) and do (Actions)
      • Loop - Actions
        • //Actions here
 
Level 5
Joined
May 27, 2007
Messages
162
Afraid I can't help. But I'm 99% sure that Upgrades are always global.

You could use a dummy unit as your upgrade, then use a trigger to set upgrade value. Then you would only have to make multiple upgrades (for each unit [city #]). When the player buys the Dummy Unit, from his City, the trigger should set upgrade level to 1. Note: the trigger should affect the upgrade which is only for unit [a].

The only way to possibly localize upgrades is to create unit specific ones...
 
Level 6
Joined
Dec 8, 2009
Messages
179
I thought a bit about my problem and.... I think I got the solution^^

I will do as Pharaoh_ suggested but I will use different player Colors controled by one player ('cause I will only have a maximum of 12 Cities (I hope))
And then it should work as I thought^^

BTW I also had this Unit Idea too several minutes ago but this doesn't fit 100%^^
 
Status
Not open for further replies.
Top