Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Turn-Based Combat Problems
Turn-Based Combat Problems
Jan 1 2011, 7:17 pm
By: Dem0n  

Jan 3 2011, 4:35 am Vrael Post #21



What I meant was, instead of using the actual death (kill score) in your triggers, you could just make triggers to keep track of the hp/damage done ect, instead of needing to detect 1 ling death to do damage. Just use the killing of a ling to be the attack animation. Kinda like how in SC, the animations we see don't actually do damage, just there is code behind it like

if( Attack == true && MyTurn == true )
{
MakeAttackAnimation(target);
DealDamage(target, 6);
}

know what I mean? What you're doing is like

if( AttackAnimation(target) == true )
{
DealDamage(target, 6)
}

However, if your way works then I suppose thats all that matters.

What I would do is setup "phases", i.e.
Conditions:
PhaseDeathCounter == 1
Actions:
Display Text( "Pick attack/spell/item"
preserve

Conditions:
PhaseDeathCounter == 1
Player Selects Attack / Timer Runs out / Player Selects Spell
Actions:
Set to 100 for PhaseDeathCounter
preserve

Conditions:
PhaseDeathCounter == 1
Player Selects Item
Actions:
Set to 1500 for PhaseDeathCounter
preserve

(use deaths say, 100-500 for "attack", 600-1000 for "spell", 1500-2000 for "item" ect)


Conditions:
PhaseDeathCounter == 100
Actions:
Order Zealot to move to enemy
Add 1 for PhaseDeathCounter
Set to 1 for "Attack timer death count"
preserve

Conditions:
PhaseDC = 101
AttackTimerDeathCount == X
Actions:
Order Zealot to move back
Set PhaseDeathCounter to 102
preserve

Conditions:
PhaseDC = 102
PlayerDamageDC = 1
Actions:
Subtract 1 health from EnemyHealthDC
Set to 103 for PhaseDC
preserve

Conditions:
PhaseDC = 102
PlayerDamageDC = 33
Actions:
Subtract 33 health from EnemyHealthDC
Set to 103 for PhaseDC
preserve

Conditions:
PhaseDC = 103
Actions:
Order zealot to turn around
Set PHase DC to 104
preserve

Conditions:
PhaseDC = 104
Actions:
Order Zealot to stop (should be turned around)
Set Phase DC to 105
preserve

Conditions:
PhaseDC = 105
Actions:
DisplayText("End of Turn")
Set PhaseDC = 0
Set "Next Player Turn DC" = 1
preserve trigger



None.

Jan 3 2011, 3:31 pm Daedalus Post #22



Yeah, you should go with Vrael's method.

I've got a partly completed turn-based battle system in which the visual stuff is just that, visual stuff. I use virtual (DC) and physical (units at specific 'data slot' locations) data to keep track of damage, hp, shields, armor, etc.
While it might be a little complicated then your system at first, once it will work it will always work and you can easily expand on it.

For example, with my system (in a space-battle simulation) I could units do multiple weaker attacks or one huge attack, armor could reduce a set amount of damage or a percentage amount of damage, you could choose how much energy you wanted to use for your shields or damage resultating in more/less damage/shields, etc.

Unless you want a really simple turn-based battle system (If you do NOT want to use a complicated system, then why are you using a turn-based battle system?!) you should probably stop for a while and think of an 'engine' for the system. Before you start triggering think of all the possible things you want to do, how you want to do it and if/how they are possible in Starcraft.
For example, I have stopped using virtual data (DC's and such) to store data a looong time ago becase I prefer physical data (units at locations). Why? Because you need a new trigger set for every DC you want to be able to add, compare, subtract, multiple, etc. In a big map with lots of units, data, spells, etc you might need tons of DC's. Using physical data you just need a few 'target' locations to select the proper data and 1 set of triggers for any action (adding, subtracting, comparing, multiplying, etc; all of which are a LOT easier with units then DC's).
The fun thing is, you could for example have 6 hp data slots for each enemy (head, body, 2 arms, 2 legs) which you can combine in any way you want. Entangling the opponent with magical roots will damage both is legs so you just use a location to select the data for both the legs. A shockwave spell might damage his whole body, so you select all his HP units, etc.
The DC's I use are usually for the less complicated data like combat phase progression, quest progression, etc. Also, for some calculations (like displaying relative hp% no matter the maximum amount of hp or the type of units) I do need DC's :(.

(English isn't my first language, so excuse me if I've been talking completely nonsense)

Anyway, good luck with your map! :P



None.

Jan 3 2011, 10:29 pm Dem0n Post #23

ᕕ( ᐛ )ᕗ

AHHHHHHHHHH IT WORKS!!!!!! THANKS NUDEE!! <33333333333

@Vrael: Yeah, using DCs does seem easier than waiting for the burrowed unit to die. ;o




Jan 4 2011, 12:05 am NudeRaider Post #24

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

^^ glad you got it. Wasn't sure when I left you yesterday. ;)

Btw. I think purely virtual system (e.g. only dcs) are better than physical systems. At least they are cleaner cause you dont need to reserve a corner or whatever for them.




Jan 5 2011, 12:06 pm Daedalus Post #25



@Nude,

If you mean for battles then I totally agree in using DC's and stuff. But for storing and editing large amounts of different types of data's I am personally more attracted to physical data storage then virtual. If you just need like three variables with in unlimited range, then DC's are the way to go. But if you want to randomize 50 different variables or using a simple&effective system to have a complicated vHP system for 20 units at the same time (with hp, armor, shields, mana, resistances, etc) then physical data storage is the way to go.
But like everything, it depends on your preferences and especially on how complicated your map is.



None.

Jan 6 2011, 2:23 pm Oh_Man Post #26

Find Me On Discord (Brood War UMS Community & Staredit Network)

IMO physical storage should only be used if you need to show the player/s what is being stored, ie. potions in an inventory or what-not. For all else, DCs are less taxing and more 'neater'. Just make sure you write down in a Notepad file what your DCs actually do. :P That's happened to me a lot, came back to my map after a long break and having to relearn what DC did what again!

This is an ambitious project Demon, I look forward to playing the end result!

@Nude: That was some impressive detective work there Sherlock!




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
Please log in to shout.


Members Online: RIVE, Roy