• 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.

Turn-based battle system

Status
Not open for further replies.

EdgeOfChaos

E

EdgeOfChaos

This is a system I created quite a while ago for a map I was planning. Originally I meant to submit this as a Resource, but I realized that it's an extremely complex system to understand and use, only for people who are good at vJASS. When I was writing the implementation instructions I found myself writing a giant essay on how to use it, and that's when I decided there wasn't any point in submitting it. Besides, the code is probably not up to THW standards as you must edit/add to system code to make it work how you want it to.

However I've seen lots of people asking for turn based battle systems over time and haven't seen a single functional one. I don't have the time or desire to touch this system up now, but I still want to get it published for the small amount who might take the time to learn and use it.

Fair warning: it's long and hard to use. Pastebinned for length.

Features in battle:
- Create a battle with different enemy-types
- Initialize battle in an arena
- Based on a custom speed stat, units take turns moving
- AI used for all enemies to decide what to use
- For players, an action selector is created which can be used to select a skill to cast on an enemy
- Easily implement debuffs like stuns/slow/cripple
- Completely customization abilities
- Floating text indicators for all actions/damage
Features out of battle:
- Gain ability points to learn new skills (max of n skills)

How to import

Battle
Action
Spells
AI
AI List
Behavior
ActionCheck
Internal

This code might be interesting to read but I wouldn't import it like this. If you actually want to use it, I've included a working turn-based RPG (though, only with a couple lands) that implements this system - you would probably find it easier to read and edit this map more than the system.
 

Attachments

  • Soulseekers.w3x
    1.6 MB · Views: 92
Last edited by a moderator:
Level 29
Joined
Jul 29, 2007
Messages
5,174
It would be preferable if you host the code on the Hive, in Jass tags for highlighting.
If you worry about the size, the Hive has its own pastebin.
Instead, though, you can just stick it in hidden tags.
For example: [hidden="Battle"][code=jass]...code...[/code][/hidden]
The system itself looks pretty cool, but I only checked some of the code.
 

EdgeOfChaos

E

EdgeOfChaos

I tried to put the code in here but it froze the editor up since it was too big.
 
The system seems interesting at first, but the artistic design is a bit lacking. I miss the units actually moving towards each other and the way you control the units is a mess (for example, the whole selection thing is fucked up; I can deselect units at will and then don't know what to do with them).

Arrow key controls would be better to select targets, imho, but that's just me.
 

EdgeOfChaos

E

EdgeOfChaos

Well if you deselect, you can just press F8 to reselect the option chooser. But you're not the first one who's told me that...

There is absolutely nothing hardcoded in the system about how the abilities work, not even the attack. If you want to code them moving towards each other, you just have to code it in your custom spells (I actually did one spell where the unit does move)

I considered arrow key selection, but... I dunno.. I kind of wanted the ability icon, tooltip, etc. to be shown and for them to work like normal wc3 abilities.
 
Status
Not open for further replies.
Top