Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Kairos
Senior Member
Volunteer Data File Author
 
Join Date: Feb 2009
Posts: 173

Old April 12th, 2013, 06:53 PM
In the tactical console, what is a pass? As in "Press this button to start a new pass for all characters?" I noticed "state.combatpass" and the "newpass" action on a portal in form_taccon.dat but can't seem to find either documented on the wiki. Does anyone know what this is/does? It seems to be related to turns, but it's not clear to me.

Thanks

Code:
    <portal
      id="newpass"
      style="actBig"
      tiptext="Press this button to start a new pass for all characters.">
      <action
        action="newpass"
        buttontext="Next Pass">
        </action>
      </portal>
Code:
pass = state.combatpass

Last edited by Kairos; April 13th, 2013 at 05:19 PM.
Kairos is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old April 13th, 2013, 10:09 PM
Tell me about the initiative system in your game - let's figure out what you need.

Passes were added for Shadowrun, which has initiative rounds and sub-rounds (called pases), so if your game doesn't use that, ignore it.
Mathias is offline   #2 Reply With Quote
Kairos
Senior Member
Volunteer Data File Author
 
Join Date: Feb 2009
Posts: 173

Old April 14th, 2013, 03:07 AM
Quote:
Originally Posted by Mathias View Post
Tell me about the initiative system in your game - let's figure out what you need.

Passes were added for Shadowrun, which has initiative rounds and sub-rounds (called pases), so if your game doesn't use that, ignore it.
That sounds promising, actually. Qin uses a similar structure (maybe? I'm not familiar with SR).

Whenever at least one character has more than one action per round, the round is divided into several exchanges. The number of exchanges in a given round equals the highest weapon skill of any one combatant. (Weapon skill determines number of actions).

So, if I'm wielding a sword with a skill of 3, and my opponent has a weapon skill of 2, there will be 3 exchanges in that round total, but my opponent won't be able to act past exchange 2.

A combatant can perform 1 action per exchange, in decreasing initiative order, alternating among the combatants until their actions are expended for that round.

Thanks again, M

Last edited by Kairos; April 14th, 2013 at 04:46 AM.
Kairos is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old April 15th, 2013, 09:17 AM
Yes, so you will need passes - they're for when there's a variable number of sub-rounds/round.
Mathias is offline   #4 Reply With Quote
Kairos
Senior Member
Volunteer Data File Author
 
Join Date: Feb 2009
Posts: 173

Old April 17th, 2013, 08:23 PM
Quote:
Originally Posted by Mathias View Post
Yes, so you will need passes - they're for when there's a variable number of sub-rounds/round.
I can't seem to figure out how to make portal[newpass] visible on the taccon form. It appears to disable when out of combat, but I can't figure out how to make it appear in combat...since it doesn't seem to be set visible = 0 anywhere.

In other words, according to the position script, it should be sitting there to the right of the new turn button, but it doesn't show. Unless I'm missing something.

Any help is, as always, greatly appreciated.
Kairos is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old April 18th, 2013, 07:40 AM
In definition.def, you'll need to define a <newpass> script that works like the <newturn> script (and appears immediately after it (<newturn> appears immediately after <newcombat>), but instead of processing the changes that need to happen when the turn moves on, it processes the changes that happen when the pass moves on.

In definition.def, you can also rename the "pass" - I believe you want to call yours "exchange";
Code:
 

<structure
folder="shadowrun"
  summarymin="115"
  summarymax="250"
  combatpassterm="pass">
  </structure>
Mathias is offline   #6 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old April 18th, 2013, 07:47 AM
I've copied the relevant parts of the <newpass> script from Shadowrun. Hopefully you can understand what's going on here, and how you'll adapt it to your game. Please ask if you need me to interpret anything.

Code:
~find out the last initiative pass needed by any actor
~Note that when determining the number of initiative passes, use the
~lower of the value at the start of the turn, and the current value. This
~is because when you gain initiative passes during a turn, they don't
~apply until next turn, but when you lose them, the loss happens
~immediately.
~NOTE: Make sure to skip characters that aren't actually part of combat.
var lastpass as number
var passes as number
foreach actor in portfolio where "!combat.noncombat"
passes = minimum(eachpick.hero.child[attrPass].field[trtFinal].value, eachpick.herofield[acPassSave].value)
lastpass = maximum(lastpass,passes)
nexteach

~if that's less than the current initiative pass, we're finished with
~this turn
if (lastpass < state.combatpass) then
@complete = 1
endif

~if the hero is in noncombat mode, skipping their combat pass screws
~things up, so just skip them entirely. This is kinda a bug in Hero Lab,
~see case 3340 in fogbugz for full details.
doneif (hero.tagis[combat.noncombat] <> 0)

~work out how many combat passes are available to us this turn, using the
~same logic as above
passes = minimum(hero.child[attrPass].field[trtFinal].value, herofield[acPassSave].value)

~otherwise we have to go ahead with the pass - this actor gets skipped if
~it doesn't have enough initiative passes to act now, unless we have a
~delayed action saved up
if (state.combatpass > passes) then
if (herofield[acDelayed].value = 0) then
perform hero.combatskip
done
endif
endif

~ Actors with initiative 0 or less don't get to act
if (herofield[tactInit].value <= 0) then
perform hero.combatskip
done
endif
Mathias is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old April 18th, 2013, 07:52 AM
The <newturn script in Shadowrun is much shorter - the only relevant part of it is the same tactInit <= 0 section that closes the newpass script.

You may not even need that - in Shadowrun, your wound penalties are subtracted from your initiative total, and if that's not positive, you don't act in that round, so you may be able to leave out the <newturn> script if your game doesn't have any special handling like that.
Mathias is offline   #8 Reply With Quote
Kairos
Senior Member
Volunteer Data File Author
 
Join Date: Feb 2009
Posts: 173

Old April 18th, 2013, 10:52 AM
Thanks, Mathias! This is just what I need to get me rolling.
Kairos is offline   #9 Reply With Quote
Kairos
Senior Member
Volunteer Data File Author
 
Join Date: Feb 2009
Posts: 173

Old April 18th, 2013, 02:12 PM
Off to a good start. I added an actions trait to track # of actions per round which gets set when a weapon is equipped. The newpass script looks to this trait.

Thanks again.
Attached Images
File Type: jpg hl_qin13.JPG (144.9 KB, 3 views)
Kairos is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:51 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.