• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

help me pls

Status
Not open for further replies.
Level 3
Joined
Aug 4, 2013
Messages
55
i starting to make RPG map but i'm stuck with laggy problem, can some1 test my map i dont know why the game start laggy after a couple of quest i take..
 
Last edited:
Level 28
Joined
Sep 26, 2009
Messages
2,520
I took just a quick look at your map. I found some things which you should improve, though they most like won't be the main source of your problem.

1) Trees - you got way too many trees. There's no need to cluster them like you do; it's even unrealistic. Now you've got 224x224 map, filled by about 1/5 and in that filled area you already have ~3350 trees. That's too much for no reason at all. You can delete up to ~40% of those trees and the map will still look the same.

2) Moving backpack unit to backpack region - this trigger is fired when any unit is issued an order targeting a point or an object. Just from the triggers, you got a 25-second periodic trigger which orders 5 footman to go somewhere. This will most likely start the backpack trigger as well.

3) You leak some locations. You've got something like this:
  • Set location = (position of (entering unit) offset by -5 towards *angle*)
This leaks, because you actually create 2 locations - 1st is "position of *unit*" and 2nd is "1st position offset by *range* towards *angle*".
So the correct way is to do this:
  • Set loc1 = (Position of (entering unit))
  • Set loc2 = loc1 offset by *range* towards *angle*
  • ... do your actions....
  • Custom script: call RemoveLocation(udg_loc1)
  • Custom script: call RemoveLocation(udg_loc2)

4*) This is not really related to the problem, but - you should start using the *raise* and *lower* tools. Landscape is not just a flat platform like you have atm. Make small hills, etc (don't use only the +/- cliffs)
 
Level 3
Joined
Aug 4, 2013
Messages
55
is this trigger are correct?

  • Inventory Remove
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Ordered unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Wait 0.10 seconds
          • Unit - Move Backpack 0032 <gen> instantly to (Center of Inventory <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Ordered unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • Wait 0.10 seconds
          • Unit - Move Backpack 0034 <gen> instantly to (Center of Inventory <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Ordered unit)) Equal to Player 3 (Teal)
        • Then - Actions
          • Wait 0.10 seconds
          • Unit - Move Backpack 0031 <gen> instantly to (Center of Inventory <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Ordered unit)) Equal to Player 4 (Purple)
        • Then - Actions
          • Wait 0.10 seconds
          • Unit - Move Backpack 0030 <gen> instantly to (Center of Inventory <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Ordered unit)) Equal to Player 5 (Yellow)
        • Then - Actions
          • Wait 0.10 seconds
          • Unit - Move Backpack 0033 <gen> instantly to (Center of Inventory <gen>)
        • Else - Actions
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Yeah, it seems fine, though it could be made more efficient by using variables.

I took the liberty of improving your trigger:

First, I created a "unit" variable called "Backpack" and made it into array (= I checked the "array" box when creating the variable)

Now a bit of theory about player numbers

Each player has a player number - Player 1 (Red)'s number is 1; Player 2 (Blue)'s number is 2 and so on.

Now in your map, I saw that players could control players red, blue, teal, yellow and purple. So player numbers range from 1 (= red) to 5 (= purple). You can use this to easily check triggering players.

I will also use player numbers as indexes for units saved in Backpack variables. Since each player has 1 Backpack unit, I can set it up like this:
Backpack[1] = Player 1 (red)'s backpack unit.
This will really simplify your trigger, as you will get rid of 5 If/Then/Else-s which you have there now.


In any trigger, that fires upon map initialization, I will put this actions:
  • ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Backpack[1] = Backpack 0001 <gen> //Player 1 (red)'s backpack unit saved into this variable
      • Set Backpack[2] = Backpack 0002 <gen> //Player 2 (blue)'s backpack unit
      • Set Backpack[3] = Backpack 0003 <gen>
      • Set Backpack[4] = Backpack 0004 <gen>
      • Set Backpack[5] = Backpack 0005 <gen>
Now the actual trigger
  • Backpack removal
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Player number of (Triggering player)) Greater than or equal to 1
      • (Player number of (Triggering player)) Less than or equal to 5
    • Actions
      • Set loc = (Center of Inventory <gen>)
      • Unit - Move Backpack[(Player number of (Triggering player))] instantly to loc
      • Custom script: call RemoveLocation(udg_loc)
Notice:
As a condition, I check the number of "Triggering Player". I check if it's greater than or equal to 1 and less than or equal to 5 - so we actually check if player number is in interval <1; 5>.
By now we know that player number 1 = player 1 (Red)'s number, etc. so this trigger will only fire when player-controlled hero has an order issued.

In the actions, I moved Backpack[player number of "triggering player"] to Inventory region. So if player 1 started this trigger by moving his hero, it will move Backpack[1] unit to Inventory region. If everything is set up correctly, it will move player 1 (Red)'s backpack away.

Also, I think that even "Center of <region>" leaks. So I created a point variable called "loc" and used it.




Edit:
I took a closer look at your map.

1) The lag-problem

It seems that the lag problem is caused by the "Talk/Action" skill. Whenever I used this skill, my fps permanently dropped down. I took a quick look at your triggers to see where the problem could be - the only thing that I saw weird were conditions - something like
"Sir Gregory <0013> equal to Target unit of ability being cast" - in a sense, this is correct, as you seek equation, however I think that the game may actually go through the whole list of conditions, in which Sir Gregory takes a part and try to find out if he is the target (didn't really test this theory, but it was the first thing that I found strange).
You can find yourself which triggers are problematic - find all triggers that are fired by the "Talk/Action" skill, disable half of them. If the game stops lagging, then you found out which half of those triggers are problematic. Now enable half of the disabled triggers - if the game starts lagging, then one of the now-enabled triggers is causing the problem --- in a sense, it's a binary search.


I played your map a few times and the game started lagging only after I used this Talk/Action ability. Until then it was more or less stable.



The rest of the points are related to the actual map from gameplay perspective:

2) Grammatic/vocabulary

I know not everyone can speak/write in English very well, but try to improve your text as best as you can, use dictionaries on the internet to spell those words correctly.



3) Choosing orc x human worker

Right now, you just get close to orc or human as a wisp and suddenly you are orc/human. It would be better if there was for example a circle of power or something which you need to enter - so people who play the game for the first time actually know what they are doing.
Also, is there any reason to pick orc over human? Or vice-versa? Do they get different stats per level or is it just cosmetic? It would be good if you could for example click on the orc and an info would pop up in game message telling you why this orc could be a good choice, etc. - it's an rpg after all.



4) Unit speaking

Right now you use game messsage to emphasize a unit speaking to you. Unless you have a reason to avoid doing it like it's done in the official campaigns, there is an action under "Cinematic" action tab: Cinematic - Transmission from unit.
This will show the unit in the portrait part of the UI, a white circle will blick a few times around the unit which speaks, it looks a lot better.



5) "Entering Ashenvale"

You can get rid of this "sign", unless you make the text more profound. I found out there was something like this by going through your triggers rather than seeing it in game.

To emphasize that you entered Ashenvale, you could do something like this:
* ENTERING CITY *
~ Ashenvale ~
As you can see, it's a lot more distinguished from the basic white colored text.



6) Roaming City guards

I see these guys are placed around the village, however your "Roaming" trigger sends them all to the same spot. You create 1 spot called Roaming and order them all to move there.

Again - unless it is intentional to have them all moving like that after 25 seconds of ingame time, it should be done like this:
Set loc - random point in *region*
Order Guard #1 to move to loc
Remove loc via custom script.
---
Set loc - random point in *region*
Order Guard #2 to move to loc
Remove loc via custom script.
---
and again and again for each guard.
Such trigger could be optimized by saving those guards into unit array, then looping through them all (saving them similarly like I posted above with the Backpack units)



7) Exclamation Marks

Many units related to some quests have exclamation mark immediately, even though they don't give you any quest. You should add them only when the NPC really wants to give you quest.

A side note: There is a unit called Gerard who wants his Ledger. It would be better to move him a few houses away, so he's not so well hidden under the semi-circle column :)



8) Quests

Sadly, they are boring and there's too many of them.
Really, one quest was "Talk to Mayor" and all you had to do in that quest was go a few streets through the city and get close to the mayor. Quest done.... really? That's all? Try to merge those quests into a bigger one. You can change quest description, add more requirements throughout the quest, etc.
Also, try to make those quests feel like a story which you are part of.

When you update/complete a quest, try to use the generic blizzard sounds (or even your own, but use them well) for updated/completed quests, also use Quest Messages, so players actually know that a quest has been updated.



9) Player 9-related things

Rename that player to something meaningful.

Not sure if it's intentional, but my worker gained XP when guards went and killed bandits at the mine - gaining Xp when other certain player kills something can be disabled through triggers.

I can see backpack that Sorceresses and Priests have - this can be disabled in Gameplay Constants by setting "Enemy inventory display" to "false".



10) Ashenvale city-related

The city feels really dead. You've got a lot a units in there, but they are all static. Making them move (purposefully) around the city and for example hide in their houses for the night would make the city feel a lot more alive.

Also some guards are positioned in quite a strange way.
#1: Guards at the city's entrance, where the way leads to the bandit-filled gold mine
- they're looking inside the city? It's an aesthetical thing, but really, shouldn't those guards be protecting the city from outside threat rather than standing like they want to prevent citizen from going out of the city?

#2: Guards at the north-eastern entrance
- in editor, they are placed relatively good, but in actually game, where the gate is opened, they are between doors of the gate and city wall - and they look inside the city again -- same thing like with the guards at road to gold mine.

You have a lot of lamps in the city. You could make the city feel a lot more like a city by switching lamps off when dawn breaks and switching them back on when for example time becomes 20:00.

Next, there is little to the town - just a bunch of houses, Mayor's house/Cathedral, (some well placed doodads), but no vendors, no tavern, etc.



11) The backpack unit and other units.

I revealed the whole map and saw that you hide units in forest - like the Backpack unit. Why don't you simply use the actions "Unit - Pause unit" and "Unit - Hide unit"?

Also, for Backpack units - give them an ability called like "Cancel"/"Close" or something, which does nothing but starts a trigger - so it feels like you *close* the bag. Right now I have to re-select my worker and move with him.

Next, make Backpack units into flying units (= change their movement type to "fly"), because right now because of pathing the backpack units gets moved aside from the worker.



12) Goldmine

You had good intentions here, but it is badly done.
#1: The bank - I'll start here because I found that really strange. I'm not sure if it is because I hit level 5 midway or not, but my worker carried gold, went inside Ashenvale Bank and nothing happened. He was unable to "return" with the resources, so he just stood there with the gold in a bag. I managed to fix this by accidentally finding out that the "crate" unit by the beach also has this "Return Gold and Lumber" ability, so I returned it there.

#2: Closed gold mine - okay so the gold mine is closed during night, but why the hell can't I enter the city with the bag? It happened to me 2 times really - I went to the gold mine, took gold from it and before I managed to enter the city, it got 18:00 and I was prevented from entering.
What would actually make more sense is to place that region around the gold mine itself and when it beats 18:00, you cannot get near the gold mine.

#3: Boringness of this whole thing - I mean there was no player interaction. I just clicked on the gold mine and I could go away from PC, make myself a coffee, etc. because I was not needed there. What's the point of playing a game in which I don't do anything then? It's also quite a pain in ass, because the worker unit is slow and it's quite a distance from the mine back to the bank.



13) Terrain

I wrote it before - you have just a flat terrain, where the terrain height is changed only by cliff size and you join 2 different levels by using a terrain "ramp".
Now, I won't write what terrain tiles you should use when or where to place doodads, etc., however there are 2 things which you should fix:
#1: Ramps themselves. The way those ramps are there right now, it looks really ugly. Look at the 2 pictures below:

This is how your ramp looks:

attachment.php



This is how your ramp looks after I played with it a little:

attachment.php


I just used the raise/lower terrain options to fix it.


#2 Holes in cliffs around the ramps - this is something which can be fixed by remaking the cliff area and ramp around the problematic area, or you can hide it using doodads. I just used some generic rock doodads to hide it:

These are the problematic holes:

attachment.php



This is how I "fixed" it by putting rocks there:

attachment.php




Overall, your map is nothing special at the moment and has a lot of issues. But it also has a potential to be a good map, if you make things right.




EDIT #2:
Seems I just figured out where the problem was ... can't believe I didn't check that earlier.
The problem is in the Talk/Action ability itself, as it is based off shockwave with nulled Data values. It seems that the game may have been calculating terrain deformations, since shockwave does that, but since Data values are all set to 0, it may have been doing that endlessly, hence the fps drops.

Base off the Talk/Action ability off "Channel" spell, as this spell does nothing by itself, can be easily set up (has lots of options to cover practically everything) and is intended for triggers.



Attachments
 

Attachments

  • WC3_holes.jpeg
    WC3_holes.jpeg
    17.8 KB · Views: 210
  • WC3_holes2.jpeg
    WC3_holes2.jpeg
    27.2 KB · Views: 219
  • WC3_ramps.jpeg
    WC3_ramps.jpeg
    42.3 KB · Views: 164
  • WC3_ramps2.jpeg
    WC3_ramps2.jpeg
    31.8 KB · Views: 193
Last edited:
Level 3
Joined
Aug 4, 2013
Messages
55
this map still in test lots of thing are not fully finish... about the villager that can go home at night, i already do that trigger, but i delete it because i thing that trigger that make my map lag. About choosing race, i focus on the human race first, then orc race that why u see there is no different between them about the trigger i will improve my trigger skill. do u still have the map? if u do and if its not a problem for u, can u sent me the map? my computer having problem i have to wipe all of my work and i dont want to start it from the beginning... thx for the reply its really helping +rep
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Here's the map.

For future tests, you can use the /fps command, which will show your fps on the upper part of the screen. This way you can see when your fps starts dropping, and hopefully deduce where problems start.


Changes I made in the attached map:
  • Replaced the problematic "Talk/Action" ability with a new one
  • Made the backpack system more efficient (remade it just like I posted in the previous post)
  • Made the first guard, who tells you that mayor wants to see you, say his text through "Cinematic - Transmission from unit" so you can see how to do it for other units.
  • Made the "Entering Ashenvale City" text more appealing and distinguished from white-colored text
  • Improved and made roaming city guards move to random points (from your version, where all of them were moving to same spot)
  • In Gameplay Constants I set "Enemy inventory display" to "False" so you can no longer see backpack of other players
  • Changing facing angle and position of some guards, who are at city entrances
  • Made lamps, fire pits, torches and braziers turn off at 6:00 and back on at 20:00 (though note that Brazier (Glowing) and Torch (Glowing) will remain on the whole time, as well as Post Lanterns like those around the cathedral, since those lamps cannot be turned off)
  • Made Backpack unit paused and hidden when unused, also gave Backpack unit a "Close Backpack" ability
  • Changed behavior of closed Gold Mine - now when it hits 18:00, you are not prevented from leaving the city, but you are prevent from entering the gold mine. However if it hits 18:00 and you are *inside* the gold mine, then you will not be stopped when you get out of it (so you can return those resources without interruption)
  • Smoothed cliff ramps
  • Fixed holes in cliffs by putting some doodads in them.


An important side note
I realized this when I was making the city guard say his text through the cinematic - unit transmission: Your quests right now are global, meaning that when one player gets close to the guard, all players will get this quest.
To set it up so only certain player gets the quest (for example the entering player) you will need to use the "GetLocalPlayer" function. Though this will most likely require a quest system and better understanding of triggering.
(it would probably require that you reduce the total amount of quests, since each quest would be in the actual games 5 times - one for each player - but every player have all of them, with the difference that they would see only their own - the reason why it would require you to reduce the amount of quests is because WC3 may not be able to handle way too many quests)
 

Attachments

  • Tales of Heroes_updated.w3x
    354.7 KB · Views: 88
Last edited:
Level 3
Joined
Aug 4, 2013
Messages
55
thx u for upload it back... but i got some serious problem with my world editor, when i start creating a map i always got error message and some time my world editor stop working... i'm very frustrated anyway thx for the updated and srry for late reply... :ogre_haosis::ogre_haosis:
 
Status
Not open for further replies.
Top