Thread: Combat Tracker...
-
August 24th, 2008, 13:52 #1
Combat Tracker...
Once again it is that time of the month... where the clueless sit down and try to code.
My current victim is the combat-tracker. We are using a rather... non-standard to say the least resolution of time segments not the combat round but actions take more floating time. AKA, if you have a certain initiative it will mean that an attack takes n segments (half-seconds) to complete.
I'd love to rebuild the combat tracker to handle this.
I know that MOD should be able to handle it... but I don't get it.
I also know that the code I need to modify is probably in utility_combattracker.xml
-
August 24th, 2008, 16:04 #2
Very happy to lend a hand ... if it helps
It would be really helpful to have a clear understanding of the problem and the objective.
Stuart
-
August 24th, 2008, 16:57 #3
Example then :
Danel has a Act-Level of 7, this means he will act at every 7 segments, I want the combat tracker to count up when I click the normal "next" button and show the people with the current initative go in order of Initiative value.
Initiative Act
Goblin 12 8
Danel 16 7
Peasant 10 8
Segment 0 - Start of Counter.
Segment 1 - Nothing
Segment 2 - Nothing
Segment 3 - Nothing
..
..
Segment 7 - Danel acts
Segment 8 - Goblin acts, followed by Peasant
..
..
Segment 14 - Danel Acts again.
..
Segment 16 - Goblin, Peasant
..
Segment 21 - Danel acts
..
Segment 24 - Gobbo, Peasant
..
Seg 28 - Danel
etc etc.
-
August 26th, 2008, 22:36 #4
I've not forgotten you Obe, and I think this is doable, but I'm just focusing on the Call of Cthulhu ruleset at the moment.
Stuart
-
August 27th, 2008, 06:45 #5
No worries. I am looking forward to that one so...
-
August 27th, 2008, 13:17 #6
Sounds a lot like the HERO system initiative process, where a turn is 12 segments, and depending on your SPEED, you go 'n' # of segments of the 12. If there is a HERO system ruleset worker out there, they might be able to help you as well...
Good Luck...It matters not how straight the gate, how charged with punishments the scroll;
I am the Master of my Fate, I am the Captain of my Soul.
-
August 27th, 2008, 14:57 #7
- Join Date
- Jun 2008
- Posts
- 768
Taking a psuedocode shot at it...
Essentially in your system, initiative is composed of two numbers instead of one. You have a value you titled 'Act-Level' and something you're calling initiative. For the sake of clarity I am going to call this 'Init-Level'.
What you could do is combine these in such a way that you make an initiative that works in the traditional way. I'm making the assumption here that the Init-Level value can never exceed 100
Consider the following formula for initiative:
Code:initiative = actlevel * 100 - initlevel
Goblin 8 * 100 -12 = 788
Danel 7 * 100 - 16 = 684
Peasant 8 * 100 - 10 = 790
Which places them in the correct order....
It should just be a matter of populating the init field on the combat tracker with the correct value.
If you need to know the segment number...that'd be more complex
-
August 27th, 2008, 17:06 #8
This would work if the initiative was still running in rounds.
It isn't. The Act-Level is a cost in half-seconds for an action. What I wanty is basically a script that will let me click up time, show WHO gets to act, then compare Initiative of those who gets to act.
-
August 28th, 2008, 06:42 #9
I haven't looked at this yet, but I think that pressing the 'next actor' button should advance a segment counter; tracker oredering is based on next-segment values for each combatant (that is in descending order of when they act next); and each combatant has its next-segment counter incremented by its act-level once its turn is complete.
Some extra coding should try to catch orphaned combatants (that have somehow fallen behind the current segment counter) and also skip segments that have no combatants available to act (so you don't have tedious clicking to do between turns).
Just an initial guess.
Stuart
-
August 28th, 2008, 08:59 #10
Exactly, and then all that one'd have to consider is a delay field. To see if someone comes in later in the action. (Like the fellow who is running towards them and will be there in 30 sec or so. )
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks