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

World Editor Issues

Status
Not open for further replies.
Level 3
Joined
May 31, 2010
Messages
21
Hello everyone. I'm relatively new to warcraft 3 mapping and I'm having a few problems with the map editor.

The premise is, I am making a mod that is meant to play almost exactly like Warcraft 2 BNE with some updates/new units/new abilities to make the game feel more interesting. I've done tier 1 and 2 of both humans and orcs (although I still need the sub for both factions and some abilities here and there) and I was about to make tier 3 when I came across a problem.

First, as far as I know it isn't possible to get a second "construction window" on warcraft 3. If you know starcraft or warcraft 2, workers have two construction windows, one for basic structures and another for more advanced ones. This isn't possible on the WC3 engine as far as I know but I've found an alternative way to do it. I've thought about making a copy of the peon with the exact same stats as the normal one, its only difference being that it will construct different buildings. I've taken the bear/druid logic and got the "switch" between the two peons to work. The problem is that the second peon does not build anything at all even though the buildings are there. Once I tell him to construct a building it goes to the location but doesn't build anything. If I place this peon on the world editor it will normally build structures and if I switch to the "normal peon" that one won't build anything either. I theorized this could be some sort of bug of the engine since I haven't found a clue on how to fix it. Since I REALLY don't feel like having a second worker for more advanced buildings, I hope someone here will be able to help me on this matter.

I also have two more problems: Since I'm aiming for warcraft 2-like gameplay, I wanted the player to start with just one peon instead of a great hall and 5 peons. Of course this can't be done because a player will automatically lose once all of its buildings are destroyed. I've found a way to fix this by placing in the map a "neutral looking" weaponless tower near a player's base with very little HP, its only functions being to warn from early rushes and to prevent the player with no great hall from losing. This works, but the problem is I have no idea on how to change the starting units for both factions. I want the human starting units to be a peasant and the orc one to be a peon and the scourge/night elf ones to be, well, nothing, since I don't plan on adding these two factions as playable (I have a dislike for the scourge as a faction and the night elves will be present only as mercenary units). I haven't got a clue on how to do this, because honestly, while the object editor is extremely user friendly and easy to learn, I've seen that the other editors are a disaster when it comes to intuitivity. This might just be me, but I couldn't do anything with the triggers aside for setting custom resources.

Last, but not least, I have an issue with the Oil Tanker. Since this is going to be similar to warcraft 2 I've already added oil tankers for both factions (Oil will not be a resource however, Oil Platforms will merely give additional gold). They work as intended but I still have two problems: First, since the tankers dump ore, I've made it so the shipyard may allow workers to dump ore. Unfortunately this works for both peons and tankers and I'd prefer if it only worked for tankers. Not sure if this can be fixed but it would be nice. The other problem I'm having is that, while the tankers work properly, as soon as I build another great hall/shipyard the tankers suddendly decide to change their return resources path and will automatically dump oil on the newly constructed shipyard or great hall, regardless of how far it is and if it can be reached at all. This makes using the tankers pratically impossible once you get another great hall. I tried looking for a function regarding returning resources, something like "Where should the worker return its resources? Nearest depot, Newly-constructed depot, etc" but found nothing.

This is the map I'm working on: http://www.speedyshare.com/files/25292186/Tides_of_Darkness.w3x

There are also a few other issues I haven't mentioned that aren't very important but I think I'll say them anyway:

First, some buildings (specifically the shipyard) have no building animation. It looks ugly but I haven't found any option to change the building animation for a structure. Is there a custom-made building animation for these two structures available for download anywhere, or is it possible to change the building animation to something else? (Hell, even the barracks animation would be good).

Second, I can't understand anything in the AI editor so the map currently only works online. I'd be glad if on a later date I could have help on this.

Thanks in advance for everyone who's gonna help me.
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
First problem: Create a dummy ability. When activated, replace the casting unit.
And set a condition to check the unit type of the casting unit, so you can replace it with the correct builder.

It'll look like this:

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to ''Dummy Ability''
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Triggering unit)) Equal to ''Worker 1''
      • Then - Actions
        • Unit - Replace (Triggering Unit) with a ''Worker 2'' using The old unit's relative life and mana
      • Else - Actions
        • Unit - Replace (Triggering Unit) with a ''Worker 1'' using The old unit's relative life and mana
Second problem: I suggest deleting that Melee trigger. Just create those custom starting units with ''Unit - Create'' actions (and of course a condition to check the race of the player).

Third problem: That's a tough one. I'll think about it some more. :p

Fourth problem: You'll need to edit the model. Ask for this in the Request forum.

Fifth problem: Here is a basic tutorial - http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/ai-editor-162687/.
 
Level 3
Joined
May 31, 2010
Messages
21
Hey, thanks for your reply! However I am still uncertain about a few things:

First problem: Create a dummy ability. When activated, replace the casting unit.
And set a condition to check the unit type of the casting unit, so you can replace it with the correct builder.

It'll look like this:

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to ''Dummy Ability''
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Triggering unit)) Equal to ''Worker 1''
      • Then - Actions
        • Unit - Replace (Triggering Unit) with a ''Worker 2'' using The old unit's relative life and mana
      • Else - Actions
        • Unit - Replace (Triggering Unit) with a ''Worker 1'' using The old unit's relative life and mana

This might sound dumb (and it probably is) but... how exactly do I create a dummy ability? Can I like... Take the Chimera corrosive ability and remove any data it uses from the object editor? Not sure if that would work since I can't see the data field that tells the ability what to do...
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
Not a dumb question at all. x)

And you're right, kinda. You need to base this ability on an ability without a target, like Mirror Image, so the effect starts whenever you use the ability.
If you base the ability on a Hero ability, change it to a Unit ability and set the amount of levels to 1.

Just remove all the data, and change the icon and tooltips.
 
Level 3
Joined
May 31, 2010
Messages
21
Not a dumb question at all. x)

And you're right, kinda. You need to base this ability on an ability without a target, like Mirror Image, so the effect starts whenever you use the ability.
If you base the ability on a Hero ability, change it to a Unit ability and set the amount of levels to 1.

Just remove all the data, and change the icon and tooltips.

Okay, I reproduced the script you showed me but there are a few problems.

First, here's the screenshot (Unfortunately my warcraft 3 isn't in english but it should be understandable)

http://i53.tinypic.com/2b2zh2.png

So here's what happens: The map now starts off during night for some reason and as soon as I use the peon's secondary ability it becomes day and I get resources. This is obviously because the fact the peon is using his ability is a condition for all the other actions that aren't related to the spell. How do I separate them?

Additionally, after I've switched to the peon once, when I try to switch back to the normal one it becomes bugged. It shows its death animation but doesnt die, and as soon as I try to build anything it gives me the old problem and refuses to build. And if I try to switch again the peon disappears from the map for a few seconds and creates a copy of itself. Is the script unfinished or is this problem related to the first one?

Thanks.

Edit: Nevermind, I managed to separate the various triggers. However the issues with the peon still remain. Any idea?

Edit 2: I think I figured out what's causing this. Basically the ability is set to apply only on a peon I've placed on the map as a starting unit and not to a "whatever unit does it". However I can't seem to be able to find the "any unit" flag...

Edit 3: I found the flag. Now it works perfectly! Thanks a lot. The only problem is that it takes a bit longer to switch the unit and it automatically deselects it, but oh well, I don't think it matters at all. It also only displays a single icon/text but I guess I can live with that.
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
Noo, you shouldn't put those triggers together.
You need a trigger for Map Initialization and a seperate trigger for that ability.

And you can select the unit with triggers (Selection - Select Unit), after you replace it.

But what exactly do you mean with ''It also only displays a single icon/text''?
 
Last edited:
Level 3
Joined
May 31, 2010
Messages
21
Second problem: I suggest deleting that Melee trigger. Just create those custom starting units with ''Unit - Create'' actions (and of course a condition to check the race of the player).

Okay now I'm trying to get this trigger to work but I can't seem to be able to find the Race condition. Could you please make a trigger window similar to the one you made for the first problem? Thanks
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
Sure.

  • Events
    • Map initialization
  • Conditions
  • Actions
    • Player Group - Pick every player in (All players) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Race of (Picked player)) Equal to Human
          • Then - Actions
            • Unit - Create 1 Peasant for (Picked player) at ((Picked player) start location) facing Default building facing degrees
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Race of (Picked player)) Equal to Orc
          • Then - Actions
            • Unit - Create 1 Peon for (Picked player) at ((Picked player) start location) facing Default building facing degrees
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Race of (Picked player)) Equal to Undead
          • Then - Actions
            • Unit - Create 1 Acolyte for (Picked player) at ((Picked player) start location) facing Default building facing degrees
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Race of (Picked player)) Equal to Night Elf
          • Then - Actions
            • Unit - Create 1 Wisp for (Picked player) at ((Picked player) start location) facing Default building facing degrees
          • Else - Actions
 
Status
Not open for further replies.
Top