Train system / Modify stats

Discussion in 'World Editor Help' started by EoW.chips, Mar 19, 2010.

  1. EoW.chips

    EoW.chips New Member

    Hey,
    I need a something like a cheatsystem for single player.
    Example: I want that the person can modify stats by something like this -agi 99 or level by -lvl 55

    Does someone if there is such a system? I already searched but didnt found something.
  2. Azrooh

    Azrooh New Member

    You can set the values with EGUI (though I'm having toubles getting it working) or JASS, and you'll need to target the units with a spell or need JASS to get the selected unit. GUI selected unit is bugged, and gives a ridiculous amount of selection bug if used frequently.
  3. Accname

    Accname 2D-Graphics enthusiast

    level and stats can easily be changed with plain normal GUI.
    Hero - Modify Hero Attribute
    Hero - Set Level

    and i never heard of anything like a "selected unit" bug, i use the GUI action to get the selected units frequently and i had never any problems for all my life.

    all you need to do for this trigger would be something like this:
    Trigger:
    • Level
      • Events
        • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
      • Conditions
        • (Substring((Entered chat string), 1, 5)) Equal to -lvl
      • Actions
        • Set SelectedUnits = (Units currently selected by Player 1 (Red))
        • Hero - Set (Random unit from SelectedUnits) Hero-level to (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))), Hide level-up graphics
        • Custom script: call DestroyGroup (udg_SelectedUnits)

    same for stats:
    Trigger:
    • Attributes
      • Events
        • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
      • Conditions
      • Actions
        • Set SelectedUnits = (Units currently selected by Player 1 (Red))
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Substring((Entered chat string), 1, 5)) Equal to -str
          • Then - Actions
            • Hero - Modify Strength of (Random unit from SelectedUnits): Set to (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Substring((Entered chat string), 1, 5)) Equal to -agi
          • Then - Actions
            • Hero - Modify Agility of (Random unit from SelectedUnits): Set to (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Substring((Entered chat string), 1, 5)) Equal to -int
          • Then - Actions
            • Hero - Modify Intelligence of (Random unit from SelectedUnits): Set to (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
          • Else - Actions
        • Custom script: call DestroyGroup (udg_SelectedUnits)
  4. EoW.chips

    EoW.chips New Member

    Works, ty very much
  5. jonas

    jonas Member

    Ever played our old map, battleships crossfire? It had a horrible selection bug, even after I changed most of the code to JASS. I don't remember the symptoms exactly, but I have a feeling it locked the selection and blocked any mouse orders, i.e., you couldn't move the selected unit anymore... Happened to me once in 3 years, but I've had it happen in games 3 times or so and we received tons of complaints.
    Last edited: Aug 22, 2016
  6. Accname

    Accname 2D-Graphics enthusiast

    I had played warcraft for years and made countless maps of my own and I can not remember ever seeing a bug like that. Cant remember anybody talking about it either. You sure its not just you guys screwing up?
  7. jonas

    jonas Member

    Crossfire was a behemoth, so it's certainly related to that. Same with the constant desync issues. The problem is that the bug was impossible to reproduce, but I also know that there's another map that had the same issue. I think it had to do with certain camera actions, and doing selection-related things via triggers. These types of issues were the main reasons I was taken aboard, to see if rewriting everything in JASS helps. It helped a bit, but not much. It's possible the issues were related to bad models, or to something silly like too many attack rolls.
  8. Accname

    Accname 2D-Graphics enthusiast

    I know that some camera actions were in fact quite bad. They did crazy stuff there in WC3.

Share This Page