RPTools.net

Discussion and Support

Skip to content

It is currently Sun Jan 21, 2018 11:42 am 






Reply to topic  [ 62 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

Previous topic | Next topic 

  Print view

Author Message
 Offline
Dragon
 
Joined: Wed Jan 07, 2009 4:36 pm
Posts: 271
Location: Gloucester, England
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Thu Aug 06, 2009 9:08 am 
nice feedback.
But I'd like to point out that was pretty much what I had when I left it, and the Dice Roller we had worked out above could handle over 100 dice, only problem was that it didn't process what the dice meant, just showed you the numbers and/or successes. I may have to cannibalise your script into mine and see what comes of it.
Right then, I may try picking this up again and seeing what I can do with it. However it's mostly Cosmetic things like templates, tokens and tables.
I also had a bad time trying to find decent top-downs of the vehicles.

Mal

EDIT: on my computer your macro doesn't have a limit mate...

_________________
Mal


Top
 Profile  
 
 Offline
Dragon
 
Joined: Wed Jan 07, 2009 4:36 pm
Posts: 271
Location: Gloucester, England
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Thu Aug 06, 2009 3:57 pm 
ok, i've stuck em together and got this:
Code:
[h: TotalWins = 0]
[h: TotalFailures = 0]
[h: TotalSixes = 0]

[h: Input(
   "UnitRoll|1|Number of unit dice to roll",
   "UnitTN|2, 3, 4, 5, 6|Unit's Target Number|LIST|select=2 Value=string",
   "SgtRoll|1|Number of sergeant dice to roll",
   "SgtTN|2, 3, 4, 5, 6|Sergeant's Target Number|LIST|select=2 Value=string"
)]

<b>Unit's Target Number:</b> [r: eval("UnitTN")]<br>
<b>Unit's results:</b><br>
[count(UnitRoll), CODE:
{
  [Rawroll = 1d6]
  [h: UnitSix = IF(Rawroll == 6, 1, 0)]
  [h: UnitWin = IF(Rawroll >= UnitTN, 1, 0)]
  [h: UnitFail = IF(Rawroll < UnitTN, 1, 0)]
  [h: UnitSixs = TotalSixes + UnitSix]
  [h: UnitWins = TotalWins + UnitWin]
  [h: UnitFailures = TotalFailures + UnitFail]
}]<br>
[r: UnitWins] Successes (of which [r: UnitSixs] are 6s) and [r: UnitFailures] Failures<br>

<b>Sergeant's Target Number:</b> [r: eval("SgtTN")]<br>
<b>Sergeant's results:</b><br>
[count(SgtRoll), CODE:
{
  [Rawroll = 1d6]
  [h: SgtSix = IF(Rawroll == 6, 1, 0)]
  [h: SgtWin = IF(Rawroll >= UnitTN, 1, 0)]
  [h: SgtFail = IF(Rawroll < UnitTN, 1, 0)]
  [h: SgtSixs = TotalSixes + SgtSix]
  [h: SgtWins = TotalWins + SgtWin]
  [h: SgtFailures = TotalFailures + SgtFail]
}]<br>
[r: SgtWins] Successes (of which [r: SgtSixs] are 6s) and [r: SgtFailures] Failures<br>

To me it looks ok.
But when I run it I get an unexpected character error message. Probably a typo on my part but i cant see it anywhere. Apparently it's in line: 1:10 and it's the character 0xA0, which to my knowledge is the UTF-8 code for a space character. I've had a couple of these errors thrown up at different points in the macro and I've managed to clear the few extra spaces. However I've looked it over and over and there aren't any extra spaces that I can see. I just need it to throw up the results so I can see if it's actually working. can anyone help?

Mal

_________________
Mal


Top
 Profile  
 
 Offline
Dragon
 
Joined: Wed Jan 07, 2009 4:36 pm
Posts: 271
Location: Gloucester, England
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Sun Aug 09, 2009 11:05 am 
ok then,
after a bit of work I got it all working (for some reason the macro button I was using to write it didn't like the code, but copying and pasting the code from my post into a new button made the unexpected char error go away :lol: then I needed to do a bit of fiddling the variables. xD)
so no thanks to any of you I have come up with this:
Code:
[hInput(
   
"UnitRoll|1|Number of unit dice to roll",
   
"UnitTN|2, 3, 4, 5, 6|Unit's Target Number|LIST|select=2 Value=string",
   
"SgtRoll|1|Number of sergeant dice to roll",
   
"SgtTN|2, 3, 4, 5, 6|Sergeant's Target Number|LIST|select=2 Value=string"
)]

[
hUnitWins 0]
[
hUnitFailures 0]
[
hUnitSixs 0]
[
hUnitOnes 0]
[
hSgtWins 0]
[
hSgtFailures 0]
[
hSgtSixs 0]
[
hSgtOnes 0]

<
b>Unit's Target Number:</b> [r: eval("UnitTN")]<br>
<b>Unit'
s results:</b><br>
[
hcount(UnitRoll), CODE:
{
  [
hRawroll 1d6]
  [
hUnitSix = IF(Rawroll == 610)]
  [
hUnitWin = IF(Rawroll >= UnitTN10)]
  [
hUnitFail = IF(Rawroll UnitTN10)]
  [
hUnitOne = IF(Rawroll == 110)]
  [
hUnitSixs UnitSixs UnitSix]
  [
hUnitOnes UnitOnes UnitOne]
  [
hUnitWins UnitWins UnitWin]
  [
hUnitFailures UnitFailures UnitFail]
}]
<
span color="green">[rUnitWinsSuccesses (of which [rUnitSixsare 6s)</span> and <span color="red">[rUnitFailuresFailures (of which [rUnitOnesare 1s)</span><br>

<
b>Sergeant's Target Number:</b> [r: eval("SgtTN")]<br>
<b>Sergeant'
s results:</b><br>
[
hcount(SgtRoll), CODE:
{
  [
hRawroll 1d6]
  [
hSgtSix = IF(Rawroll == 610)]
  [
hSgtWin = IF(Rawroll >= UnitTN10)]
  [
hSgtFail = IF(Rawroll UnitTN10)]
  [
hSgtOne = IF(Rawroll == 110)]
  [
hSgtSixs SgtSixs SgtSix]
  [
hSgtOnes SgtOnes SgtOne]
  [
hSgtWins SgtWins SgtWin]
  [
hSgtFailures SgtFailures SgtFail]
}]
<
span color="green">[rSgtWinsSuccesses (of which [rSgtSixsare 6s)</span> and <span color="red">[rSgtFailuresFailures (of which [rSgtOnesare 1s)</span

So, what's next on the agenda?... :p

Mal

_________________
Mal


Top
 Profile  
 
User avatar  Offline
Kobold
 
Joined: Wed Aug 19, 2009 3:54 pm
Posts: 21
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Wed Sep 02, 2009 3:57 pm 
I have been working on a 40K framework and have been working with the scripts and ideas you guys have posted here. However, I am old and have a job and family and not much time to code anymore. I was wondering if any of you guys ever got your 40K game up and running and would be willing to share your framework with me?

I would also be very ineterested in playing matches if any of you are looking for a game.

_________________
The Lord of Fire will rise again in the City of Illusions, and only three can return him to his prison: the child of storms, the shaper of steel, and the hand of the Keeper.


Top
 Profile  
 
 Offline
Dragon
 
Joined: Wed Jan 07, 2009 4:36 pm
Posts: 271
Location: Gloucester, England
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Thu Sep 03, 2009 6:02 am 
I've not done much since my last.
I'd be up for putting more work in if someone tells me what needs to be done and I'd defo be up for a game :D

Mal

_________________
Mal


Top
 Profile  
 
User avatar  Offline
Kobold
 
Joined: Wed Aug 19, 2009 3:54 pm
Posts: 21
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Thu Sep 03, 2009 6:18 pm 
Malekith wrote:
I've not done much since my last.
I'd be up for putting more work in if someone tells me what needs to be done and I'd defo be up for a game :D

Mal


I have been speaking with my brother (who is an avid 40K player) and it looks like we may have everything we need with what has already been developed. The only other thing I can think of might be a macro to set-up tokens with stats, weapons, armor, etc. I am going to work on that. I am also going to modify the properties slightly to handle vehicles, dreadnaughts, and demons.

The next challenge is getting pics of overhead models for play, which he is working on. He is going to start by taking pictures of his own army of Space Wolves and his Chaos Nurgle army.

Do you have tokens already set up? Do you know what army you plan on playing?

_________________
The Lord of Fire will rise again in the City of Illusions, and only three can return him to his prison: the child of storms, the shaper of steel, and the hand of the Keeper.


Top
 Profile  
 
 Offline
Dragon
 
Joined: Wed Jan 07, 2009 4:36 pm
Posts: 271
Location: Gloucester, England
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Thu Sep 03, 2009 8:04 pm 
1 that's awesome. there were some ideas furthur back in this thread about what else might be nice to include.
2 use a new set of properties under 'Vehicle' or something to keep everything nice and separate.
3 i have a few tokens but setting up the right sizes and getting decent ones is hard. I have often thought that physically taking the pictures myself would be easier. So I'll probably make a start on some of mine too once they're ready.
4 I'll play any army i can get enough rules to make a list for and the tokens to field it with. :D

Mal

_________________
Mal


Top
 Profile  
 
 Offline
Dragon
 
Joined: Wed Jan 07, 2009 4:36 pm
Posts: 271
Location: Gloucester, England
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Fri Oct 09, 2009 4:54 pm 
heya guys.
Sorry If I'm necroing and no-one else is interested. just tell me if that's the case and i'll shut up.
My laptop died on me the other day and so I lost all the campaign files etc for this project, however I've managed to get most of it back now on my external hard drive (next to my MT installation there :D) however I'm missing those template tokens that are found on page 2, anyone have a copy they can send me?
I'm also probably gonna be working on this for my own benefit and seeing where I can take it. Is anyone else interested, or shall I just shut up now and keep to myself? lol :P

Mal

_________________
Mal


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Sun Jan 13, 2008 5:52 pm
Posts: 871
Location: Lakewood, CO North America
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Sat Oct 10, 2009 2:46 pm 
I've got WFRP tokens (all of them from all of the books) on my gallery page if that helps. They're from my periodic WFRP on Maptools minicampaigns.

Jay H

_________________
Yes, I'm a chiropractor. Gamer fitness at Hafner Chiropractic in Lakewood, CO: http://www.HafnerChiropractic.com


Top
 Profile  
 
 Offline
Dragon
 
Joined: Wed Jan 07, 2009 4:36 pm
Posts: 271
Location: Gloucester, England
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Sun Oct 11, 2009 4:12 am 
cheers, but I'm after the tokens that were posted in this thread, by Jshock.
I may still have a look at your tokens tho :D

Mal

_________________
Mal


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Sat Jan 26, 2008 8:55 pm
Posts: 325
Location: West Warwick, RI
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Sun Oct 11, 2009 9:03 am 
Ahh crap, didn't realize the links weren't working! They're up in my gallery now, they won't be going anywhere.

Large template (w/scatter):
http://gallery.rptools.net/d/34468-2/Large+Blast+_scatter+lines__rptok?g2_GALLERYSID=98a123d079394b1b5317bd0d25ae7918

Small template (w/scatter):
http://gallery.rptools.net/d/34471-2/Small+Blast+_scatter+lines__rptok?g2_GALLERYSID=98a123d079394b1b5317bd0d25ae7918

These could be redone better nowadays with MoveToken, though.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Mon Oct 05, 2009 11:29 am
Posts: 2
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Mon Oct 12, 2009 11:34 pm 
Here's my Scatter macro. Just lay down the blast token on your target, make sure the blast token is selected, and then click this macro button:

Code:
[h: Input(
   "AttackerBS|1|Attacker's BS"
)]
[h: Rawroll = 1d6]
[h: ScatDice = IF(Rawroll < 3, "Dead On", "Scattered")]
[h: ScatterInches = IF(Rawroll < 3, 0, 2d6 - AttackerBS)]
[h: ScatterInchesText = IF(Rawroll < 3, "", ScatterInches)]
[h: ScatterText = IF(Rawroll < 3, "", " inches<br>")]
[h: myAngle = 1d90]
[h: myRadians = divide(myAngle, 57.2958)]
[h: sinAngle = myRadians - divide(power(myRadians, 3),6)]
[h: sinAngle = sinAngle + divide(power(myRadians, 5),120)]
[h: sinAngle = sinAngle - divide(power(myRadians, 7),5040)]
[h: cosAngle = 1 - divide(power(myRadians, 2),2)]
[h: cosAngle = cosAngle + divide(power(myRadians, 4),24)]
[h: cosAngle = cosAngle - divide(power(myRadians, 6),720)]
[h: XMovement = IF(Rawroll < 3, 0, floor(multiply(ScatterInches,cosAngle,50)))]
[h: YMovement = IF(Rawroll < 3, 0, floor(multiply(ScatterInches,sinAngle,50)))]
[h: leftRight = 1d2]
[h: leftRight = IF(leftRight == 2, -1, 1)]
[h: upDown = 1d2]
[h: upDown = IF(upDown == 2, -1, 1)]
[h: myAngle = IF(upDown == -1, myAngle + 90, myAngle)]
[h: myAngle = IF(leftRight == -1, 360- myAngle, myAngle)]
[h: XMovement = multiply(XMovement,leftRight)]
[h: YMovement = multiply(YMovement,upDown)]
[h: ScatterAngle = myAngle]
[h: ScatterAngleText = IF(Rawroll < 3, "", ScatterAngle)]
[h: ScatterAnglePreText = IF(Rawroll < 3, "", "Angle: ")]
[h: ScatterAnglePostText = IF(Rawroll < 3, "", " degrees (0=East, 90=North, etc.)")]

Scatter Results: [ScatDice]<br>

[h: ids = getSelected()]
[foreach(id, ids), CODE:
   {
   [h: CurrentX = getTokenX(1, id)]
   [h: CurrentY = getTokenY(1, id)]
   [h: NewX = CurrentX + XMovement]
   [h: NewY = CurrentY - YMovement]
   [h: moveToken(NewX, NewY, 1, id)]
   }
]

[ScatterInchesText][ScatterText]
[ScatterAnglePreText][ScatterAngleText][ScatterAnglePostText]


Top
 Profile  
 
 Offline
Dragon
 
Joined: Wed Jan 07, 2009 4:36 pm
Posts: 271
Location: Gloucester, England
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Wed Oct 14, 2009 2:07 pm 
Wow, that's an impressive macro there seanb!
How long that take you to make? and what scale grid is that working on? IIRC a basic troop base is about 2/3 inches depending on the game type and army so that's what I'm basing mine on. And a little breakdown of it would be lovely as it'd help my macro writing skills. :D
And thanks Jshock for re-posting, the tokens are still useful especially when used with sean's nice new macro.

Mal

_________________
Mal


Top
 Profile  
 
 Offline
Kobold
 
Joined: Mon Jun 19, 2006 11:57 pm
Posts: 7
Location: Canada
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Fri Nov 20, 2009 5:32 pm 
hey is there any way i can get in on the 40k bash?
Have only played 40k a couple of times. I have all the books, except the tau i think...
I'd love to learn how to play so if it just means being in vent with some players for their game I would be up for that.
Assuming its a yes...
Do you need my email?


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sun Aug 19, 2012 11:37 am
Posts: 1
 Post subject: Re: Warhammer 40k or Fantasy Wargame?
PostPosted: Sun Aug 19, 2012 11:41 am 
Hi.

Sorry for the massive necropost, but did anything become of this? Any campaign files to download if one wanted to play with these macros?


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 62 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman