4e: Basic Face-To-Face Game Campaign File

Framework(s) for D&D 4e, including Veggiesama's.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

Post Reply
DevoDog
Dragon
Posts: 456
Joined: Sat Jul 12, 2008 9:56 am

4e: Basic Face-To-Face Game Campaign File

Post by DevoDog »

Updated 11 July 2009:

This is a very basic campaign file that I use for face-to-face games.

I've done a lot of cleanup (consolidating several separate macros into a single macro).

Thanks to Rumble, I have some basic condition tracking/expiration.

The file is primarily used to keep track of HP, Surges, and Power Usage.

For monsters, I have some scaling of monsters built into a macro. Use Monster Stats to stat out a monster than use Monster Scaling to finalize. The Monster Attack macro includes the basic idea (adjusting damage based on the monster's actual level).

One thing that I couldn't figure out is how to automate saving throws for Save Ends conditions so that the players make their own rolls, but monsters do so automatically. The problem is that I couldn't nest the loop options like I wanted AND use a single macro instead of different macros for players and monsters.
Attachments
USBCopy.cmpgn
(610.91 KiB) Downloaded 109 times
USB.cmpgn
(427.38 KiB) Downloaded 90 times
Last edited by DevoDog on Sat Jul 11, 2009 9:01 pm, edited 1 time in total.

DevoDog
Dragon
Posts: 456
Joined: Sat Jul 12, 2008 9:56 am

Re: 4e: Basic Face-To-Face Game Campaign File

Post by DevoDog »

For PC's, the Initiative-PCs macro only wants the RAW die roll from the players. Their INIT Bonus is included in the macro.

I've been adding some functionality (tracking of power usage, magic item usage, etc). It's still not 100% complete.

I'm hoping to be able to decipher Rumbles condition tracking and incorporate that. Conditions that expire at the end of someone's turn are the most difficult to keep track of, so I'm hoping to be able to figure it out.

Please note: This campaign file is intended for face-to-face games where MT simply helps facilitate things. There are DEFINITELY better options for online campaigns.

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: 4e: Basic Face-To-Face Game Campaign File

Post by Rumble »

DevoDog wrote:For PC's, the Initiative-PCs macro only wants the RAW die roll from the players. Their INIT Bonus is included in the macro.

I've been adding some functionality (tracking of power usage, magic item usage, etc). It's still not 100% complete.

I'm hoping to be able to decipher Rumbles condition tracking and incorporate that. Conditions that expire at the end of someone's turn are the most difficult to keep track of, so I'm hoping to be able to figure it out.

Please note: This campaign file is intended for face-to-face games where MT simply helps facilitate things. There are DEFINITELY better options for online campaigns.

I'll give you the basic idea I had, which might help in deciphering my awful code and nonexistent documentation.

1. Establish "End Turn" and "Start Turn" macros, because there's no automatic "onLoseInitiative" event or anything like that - the players need to deliberately signal the end of their turns and the beginnings.

2. Devise a method to store the following info: what the condition is, who inflicted it, when they inflicted it (what turn), and when it expires (End of Turn, Beginning of Turn, End of Encounter, or Save Ends - those are the basic ones).

3. Then, in the end turn macro:

a. Identify whose turn is ending (that's basically, "who is the current token?")
b. Find all conditions that character is suffering from that are save-ends, and make saving throws against each condition.
c. Get a list of all characters on the map.
d. Go one by one, using switchToken() to make each one the Current Token, and read through their lists of various conditions. If you find one that:

1) was inflicted by the person whose turn is ending, and
2) is set to expire at "End of Turn", and
3) was inflicted one round previously

then you switch off that condition. If any one of those is not true, the condition persists.

The process is similar for beginning a turn. There are functions that get the current initiative round, who currently has initiative, and so forth, and those will be critical. There may be more efficient ways to do it, but that's how I did (if you read through my framework, you'll note that the Start Turn and End Turn macros actually call a third function, because the process is the same for starting and ending, and the only different thing is really whether you're starting or ending the turn).

DevoDog
Dragon
Posts: 456
Joined: Sat Jul 12, 2008 9:56 am

Re: 4e: Basic Face-To-Face Game Campaign File

Post by DevoDog »

Thanks for your feedback, Rumble. I really appreciate it.

I also just found the "Combat Manager" thread you were talking about (I kept looking in the Frameworks subforum).

I think that, for me, because I'm an "amateur programmer", I like to be able to understand the logic/process and see if I can replicate things for myself.

I hope that I'm not coming across as someone you want to yell "RTFM" at. I see a lot of posting in the www.dotnetnuke.com forums where I really wonder if the folks who are using that app have the basic knowledge to be using the app.

To you, Rumble, and all of the other folks who are making MT the incredibly useful (and awesome) application that it is, I offer my gratitude (and a cookie).

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: 4e: Basic Face-To-Face Game Campaign File

Post by Rumble »

Nope. I rarely if ever have the RTFM urge, honestly. And, you know, cookies.

Anyway, I hope you can decipher my work. I go through it every so often and try to document it (sometimes, not quite remembering why I did what I did myself), but it's slow going.

Anyway, both the Combat Manager and my full-blown combat framework for D&D use the same basic procedure; the combat framework one is considerably more sophisticated - it applies regeneration and ongoing damage, adjusts attacks and defenses as appropriate, and so forth.

I really hope that one day my group and I will actually get to try it ourselves...

DevoDog
Dragon
Posts: 456
Joined: Sat Jul 12, 2008 9:56 am

Re: 4e: Basic Face-To-Face Game Campaign File

Post by DevoDog »

Rumble,
Thanks for your help regarding the logic for conditions.

I worked on some things today and here's what I came up with (it works). The top part are the token properties that need to be in place then are the macros:

EOT
AppliedBy
NewEOT
NewAB
SaveEnds


Start Turn:
[EOT=if(NewEOT=="",EOT,listAppend(EOT,NewEOT))]
[AppliedBy=if(NewAB=="",AppliedBy,listAppend(AppliedBy,NewAB))]
[NewEOT=""]
[NewAB=""]

End Turn:
[tokenid=getInitiativeToken()]
[tokenName=getName(tokenid)]
[FOREACH(token,getVisibleTokens()),CODE:
{
[switchToken(token)]
[num=0]
[WHILE(listContains(AppliedBy,tokenName)>0),CODE:
{
[pos=listFind(AppliedBy,tokenName)]
[State=listGet(EOT,pos)]
[setState(State,0)]
[AppliedBy=listDelete(AppliedBy,pos)]
[EOT=listDelete(EOT,pos)]
}
]
}
]

[FOREACH(token,getVisibleTokens()),CODE:
{
[switchToken(token)]
[FOREACH(state,EOT),CODE:
{
[setState(state,1)]
}
]
[FOREACH(state,SaveEnds),CODE:
{
[setState(state,1)]
}
]
}
]



Apply EOT Effect:
[eval("input('Effect|'+getTokenStates()+'|Effect|LIST|VALUE=String','From|'+getVisibleTokenNames()+'|FROM|LIST|VALUE=STRING')")]
[NewEOT=listAppend(NewEOT,Effect)]
[NewAB=listAppend(NewAB,From)]
[setState(Effect,1)]


Apply Save Ends Effect:
[eval("input('Effect|'+getTokenStates()+'|Effect|LIST|VALUE=String')")]
[SaveEnds=listAppend(SaveEnds,Effect)]
[setState(Effect,1)]

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: 4e: Basic Face-To-Face Game Campaign File

Post by Rumble »

I recommend you use the code tags in the forum - it makes MT code a lot easier to review.

I'll have to read through that, but if it works, it works!

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: 4e: Basic Face-To-Face Game Campaign File

Post by Rumble »

I'm not following the logic entirely quite yet (I read code badly, though), but it looks like you're setting them up with specific groups: if you want an End-of-Turn effect, use the End-of-Turn macro, and so forth. Not bad.

Another recommendation or tip - you don't have to use eval() to get those inputs to work. You can create the input like so:

Code: Select all

[h:status = input(
    'Effect|'+getTokenStates()+'|Effect|LIST|VALUE=String',
    'From|'+getVisibleTokenNames()+'|FROM|LIST|VALUE=STRING')]
[h:abort(status)]
 

DevoDog
Dragon
Posts: 456
Joined: Sat Jul 12, 2008 9:56 am

Re: 4e: Basic Face-To-Face Game Campaign File

Post by DevoDog »

I've made some more tweaks and cleanup to my Campaign File.

I came up with a method to deal with Save Ends conditions so that monsters make all of their rolls automatically (my problem was dealing with the limits of nested loop options).

I'm going to be eliminating the Monster Scaling that I built in (monster scaling is available in the campaign files in the first post of this thread).

I've reduced the amount of Campaign Macros and will be attacking default macros to the monster tokens (Single Target Attack, Multiple Target Attacks, Other Powers, and powers with recharges).
Attachments
USBCopy.cmpgn
(623.99 KiB) Downloaded 70 times

DevoDog
Dragon
Posts: 456
Joined: Sat Jul 12, 2008 9:56 am

Re: 4e: Basic Face-To-Face Game Campaign File

Post by DevoDog »

Okay...I've done some more tweaks.

Updates include some default macros for Monster Tokens.

Cleanup of Macros (I think the previous version still had Start Turn/End Turn macros....clicking End Turn will trigger what had been in the Start Turn macro).

Monster power recharges (die roll recharges) are built into the Start Turn macro.
Attachments
CopyUSB.cmpgn
(1013.54 KiB) Downloaded 72 times

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: 4e: Basic Face-To-Face Game Campaign File

Post by Rumble »

I...didn't see a Start Turn macro in there. Where should I be looking?

Also, as a suggestion - for macros that use inputs, you might want to structure your input like this:

Code: Select all

[h:continue = input("stuff|0|Some stuff")]
[h:abort(continue)]
 

Since the return value of the input() function is 1 if the user hits OK, and 0 if they hit Cancel, a setup like that will stop processing the macro if the user hits "Cancel" on the input box.

Edit: duh, I should read more closely.

DevoDog
Dragon
Posts: 456
Joined: Sat Jul 12, 2008 9:56 am

Re: 4e: Basic Face-To-Face Game Campaign File

Post by DevoDog »

Rumble wrote:I...didn't see a Start Turn macro in there. Where should I be looking?
Edit: duh, I should read more closely.
Yeah...built it into the End Turn....I kept forgetting to use the two macros when they were separate.

In regards to the input macros for player/monster attacks, the player view (outputted to my TV) doesn't show the Chat window....so the players don't see it if I make a mistake. The player attack macros are there primarily so that I can see the secondary effects of powers.

Oh yeah, the combat macros are based on visible tokens...so when using it, make sure the visiblity of opponents is set correctly.

And for completely web-based games, I'd still recommend Rumble's framework.

Post Reply

Return to “D&D 4e Frameworks”