# RPTools.net

Discussion and Support

It is currently Thu Dec 05, 2013 4:07 am

### Forum rules

PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.

 Page 2 of 3 [ 45 posts ] Go to page Previous  1, 2, 3  Next
Author Message
 wolph42   Deity Joined: Fri Mar 20, 2009 4:40 amPosts: 6548Location: Netherlands
 Post subject: Re: Light vision IlluminationPosted: Thu Nov 12, 2009 10:08 am
Crusufix wrote:
This is very cool, unfortunately I don't see your attached XLS sheet, which is a shame cause I'd like to get this to work for other colours as well.

hmm good point, I'm sure I attached it... here is it again. I don't know if it will work in google docs due to the HEX2DEC and DEC2HEX functions I use (for which you need the Excel Analysis Tool Pack, or build them yourself...).

Note the sheet contains a lot more then just the auras/light stuff but it all in the sheet auras.

ahhh I quote:
Quote:
The extension xls is not allowed.

I must have missed that the last time and just clicked it away.

Edit: Sheet in next post works without analysis toolpack as well.

_________________

Last edited by wolph42 on Fri Nov 13, 2009 4:43 am, edited 1 time in total.
 wolph42   Deity Joined: Fri Mar 20, 2009 4:40 amPosts: 6548Location: Netherlands
 Post subject: Re: Light vision IlluminationPosted: Fri Nov 13, 2009 4:42 am
Ok I've updated the GoogleDoc now it works:

Humbly submitting the Light Source Gradient calculator :

Attached is an excelsheet that should work with open office as well.

Edit: just for the fun of it, the Hex2Dec function written in excel lingo looks like this:
Code:
=IF(ISERROR(INT((MID(\$D4,1,1)))),INT(CODE(MID(\$D4,1,1))-87),MID(\$D4,1,1))*16^5+IF(ISERROR(INT((MID(\$D4,2,1)))),INT(CODE(MID(\$D4,2,1))-87),MID(\$D4,2,1))*16^4+IF(ISERROR(INT((MID(\$D4,3,1)))),INT(CODE(MID(\$D4,3,1))-87),MID(\$D4,3,1))*16^3+IF(ISERROR(INT((MID(\$D4,4,1)))),INT(CODE(MID(\$D4,4,1))-87),MID(\$D4,4,1))*16^2+IF(ISERROR(INT((MID(\$D4,5,1)))),INT(CODE(MID(\$D4,5,1))-87),MID(\$D4,5,1))*16^1+IF(ISERROR(INT((MID(\$D4,6,1)))),INT(CODE(MID(\$D4,6,1))-87),MID(\$D4,6,1))

And that was the easy one, the other way round (Dec2Hex) was the real pickle.

_________________
 trevor   Codeum Arcanum (RPTools Founder) Joined: Mon Jan 09, 2006 4:16 pmPosts: 11386Location: Austin, Tx
 Post subject: Re: Light vision IlluminationPosted: Fri Nov 13, 2009 1:52 pm
Very awesome.

I'm always amazed what you all come up with !

_________________
Dreaming of a 1.3 release

 lmarkus001   Great Wyrm Joined: Fri Mar 28, 2008 11:30 pmPosts: 1612Location: Layfayette Hill, PA
 Post subject: Re: Light vision IlluminationPosted: Mon Nov 16, 2009 9:18 am
Very cool, thanks!

_________________
Whisper Frame, Map Move-To Points, Handouts | D&D3.5 / Pathfinder Framework

 wolph42   Deity Joined: Fri Mar 20, 2009 4:40 amPosts: 6548Location: Netherlands
 Post subject: Re: Light vision IlluminationPosted: Mon Nov 16, 2009 11:01 am
you're welcome, maybe you want to sticky this as well?
Or shall I update the other sticky post of me with this?

_________________

 CyrusStonecypher   Giant Joined: Thu Nov 26, 2009 1:22 amPosts: 158Location: Columbus, IN, U.S.A.
 Post subject: Re: Light vision Illumination Generator Tool (Excel)Posted: Mon Dec 14, 2009 1:05 pm
This looks pretty sweet! I'm looking for way to display threat range for a barbarian lugging around an oversized greatsword that gives her a 10' threat range.

_________________
Stuff created by more capable MT users than myself :[Light vision Illumination Generator Tool] [External table editor] [Lindsay's Generic Tools] [Import and Export Maps for b63] [Group Movement]

 wolph42   Deity Joined: Fri Mar 20, 2009 4:40 amPosts: 6548Location: Netherlands
 Post subject: Re: Light vision Illumination Generator Tool (Excel)Posted: Mon Dec 14, 2009 1:45 pm
CyrusStonecypher wrote:
This looks pretty sweet! I'm looking for way to display threat range for a barbarian lugging around an oversized greatsword that gives her a 10' threat range.

Well.. You've found you're way

_________________

 bmcoomes   Cave Troll Joined: Wed Jan 27, 2010 9:27 pmPosts: 28Location: Ephrata, WA
 Post subject: Re: Light vision Illumination Generator Tool (Excel)Posted: Thu Feb 04, 2010 10:36 am
I've ran with this idea and applied it to SR4 but I'm needing help to update the macro. I'm looking for something like Wolph42's but with a pull down maybe selecting the weapon type.

Thanks,
Brent
Code:
Automatics
----
Assault Rifle Long : aura cone arc=45 350#ff0000
SMG Medium : aura cone arc=45 40#aa0000
Machine Pistol Extreme : aura cone arc=45 50#800000
SMG Extreme : aura cone arc=45 150#800000
Assault Rifle Short : aura cone arc=45 50#cc0000
SMG Long : aura cone arc=45 80#ff0000
SMG Short : aura cone arc=45 10#cc0000
Machine Pistol Long : aura cone arc=45 30#ff0000
Assault Rifle Medium : aura cone arc=45 150#aa0000
Assault Rifle Extreme : aura cone arc=45 550#800000
Machine Pistol Short : aura cone arc=45 5#cc0000
Machine Pistol Medium : aura cone arc=45 15#aa0000

Heavy Weapons
----
MMG Extreme : aura cone arc=45 1,200#800000
MMG Long : aura cone arc=45 750#ff0000
LMG Medium : aura cone arc=45 200#aa0000
HMG Extreme : aura cone arc=45 1,200#800000
HMG Long : aura cone arc=45 750#ff0000
Assault Cannon Extreme : aura cone arc=45 1,500#800000
Assault Cannon Medium : aura cone arc=45 300#aa0000
HMG Short : aura cone arc=45 80#cc0000
Assault Cannon Long : aura cone arc=45 750#ff0000
LMG Short : aura cone arc=45 75#cc0000
HMG Medium : aura cone arc=45 250#aa0000
Assault Cannon Short : aura cone arc=45 100#cc0000
LMG Extreme : aura cone arc=45 800#800000
MMG Short : aura cone arc=45 80#cc0000
LMG Long : aura cone arc=45 400#ff0000
MMG Medium : aura cone arc=45 250#aa0000

Pistol Ranges
----
Light Pistol Medium : aura cone arc=45 15#aa0000
Taser Extreme : aura cone arc=45 20#800000
Heavy Pistol Extreme : aura cone arc=45 60#800000
Light Pistol Short : aura cone arc=45 5#cc0000
Taser Medium : aura cone arc=45 10#aa0000
Heavy Pistol Medium : aura cone arc=45 20#aa0000
Hold-out Long : aura cone arc=45 30#ff0000
Light Pistol Long : aura cone arc=45 30#ff0000
Heavy Pistol Short : aura cone arc=45 5#cc0000
Ligh Pistol Extreme : aura cone arc=45 50#800000
Taser Long : aura cone arc=45 15#ff0000
Hold-out Short : aura cone arc=45 5#cc0000
Taser Short : aura cone arc=45 5#cc0000
Heavy Pistol Long : aura cone arc=45 40#ff0000
Hold-out Extreme : aura cone arc=45 50#800000
Hold-out Medium : aura cone arc=45 15#aa0000

Longarms
----
Shotgun (Slug) Long : aura cone arc=45 80#ff0000
Sporting Rifle Short : aura cone arc=45 100#cc0000
Shotgun (Flechette) Extreme : aura cone arc=45 60#800000
Sniper Rifle Extreme : aura cone arc=45 1,500#800000
Shotgun (Flechette) Medium : aura cone arc=45 25#aa0000
Shotgun (Slug) Extreme : aura cone arc=45 150#800000
Sporting Rifle Long : aura cone arc=45 500#ff0000
Sporting Rifle Medium : aura cone arc=45 250#aa0000
Sniper Rifle Short : aura cone arc=45 150#cc0000
Sporting Rifle Extreme : aura cone arc=45 750#800000
Sniper Rifle Medium : aura cone arc=45 350#aa0000
Shotgun (Slug) Short : aura cone arc=45 10#cc0000
Shotgun (Slug) Medium : aura cone arc=45 40#aa0000
Shotgun (Flechette) Short : aura cone arc=45 10#cc0000
Sniper Rifle Long : aura cone arc=45 800#ff0000
Shotgun (Flechette) Long : aura cone arc=45 40#ff0000

Code:
[h:Range = json.get(PrimaryWeapon, "Range")]
[r,if(Range=="" || Range==0):"Doesn't carry ranged weapon";"Range = "+Range]<br>
[h, if(hasLightSource("Ranges", "Range "+Range)), CODE:{
[h: setLight("Ranges", "Range "+Range, 0)]
[h: setLight("Ranges", "Range "+Range+"s", 0)]
[h: setLight("Ranges", "Range "+Range+"l", 0)]
};{
[h: setLight("Ranges", "Range "+Range, 1)]
[h: setLight("Ranges", "Range "+Range+"s", 1)]
[h: setLight("Ranges", "Range "+Range+"l", 1)]
}]

 wolph42   Deity Joined: Fri Mar 20, 2009 4:40 amPosts: 6548Location: Netherlands
 Post subject: Re: Light vision Illumination Generator Tool (Excel)Posted: Thu Feb 04, 2010 2:16 pm
That doesn't sound too hard. What you need first is to build a json object library of your weapons.
Code:
[h:newWeaponName = "Shotgun"]
[h:newWeaponObject = json.set("{}", "Category","Ranged", "Group","Solid Projectile", "Class","Basic", "Range",30, "SingleShot",1, "SemiBurst",0, "FullBurst",0, "WpnDamDice",1, "WpnDamDiceType",10, "WpnDamMod",4, "DamType","Impact", "Penetration",0,"Clip",0,"ClipSize",2,"NumClips",0, "ClipType","-","RldTime","2 Full", "TwoHanded",1, "Special","Reliable, Scatter", "Weight",5, "Cost",60, "Availability","Common", "Page",133, "Source","Dark Heresy")]
[h:WeaponLibrary= json.set(WeaponLibrary,newWeaponName,newWeaponObject)]

[h:newWeaponName = "Hand Bow"]
[h:newWeaponObject = json.set("{}", "Category","Ranged", "Group","Primitive", "Class","Pistol", "Range",15, "SingleShot",1, "SemiBurst",0, "FullBurst",0, "WpnDamDice",1, "WpnDamDiceType",10, "WpnDamMod",2, "DamType","Impact", "Penetration",0,"Clip",0,"ClipSize",1,"NumClips",0, "ClipType","-","RldTime","1 Full", "TwoHanded",0, "Special","Primitive, ", "Weight",1, "Cost",200, "Availability","Rare", "Page",135, "Source","Dark Heresy")]
[h:WeaponLibrary= json.set(WeaponLibrary,newWeaponName,newWeaponObject)]

etc.
Then you can use json.fields function to create a weapon list from the library:
Code:
wpnList = json.fields(WeaponLibrary)
, this list you can feed into an input function:
Code:
[h:status=input("whichWpn|"+wpnList+"|Choose Weapon to Display|LIST|SELECT=0")]
[h:abort(status)]

Then retrieve the details from the json object of the weapon
Code:
primaryWeapon = json.get(WeaponLibrary,whichWpn)

Finally you need to adjust my code you're referring at a bit, change the "l" and "s" into "long" and "short" and add "extreme". And you can feed primaryWeapon into the code.

_________________

Last edited by wolph42 on Fri Feb 05, 2010 3:38 am, edited 1 time in total.

 bmcoomes   Cave Troll Joined: Wed Jan 27, 2010 9:27 pmPosts: 28Location: Ephrata, WA
 Post subject: Re: Light vision Illumination Generator Tool (Excel)Posted: Fri Feb 05, 2010 3:29 am
OK sound great! But is there a tutorial for an example how to start learning this? I have a vage idea on how to go about it but after the library token I start getting lost.

 wolph42   Deity Joined: Fri Mar 20, 2009 4:40 amPosts: 6548Location: Netherlands
 Post subject: Re: Light vision Illumination Generator Tool (Excel)Posted: Fri Feb 05, 2010 4:04 am
erm... probably yes, but I do not know of a single tutorial that covers this all. This will require you to 'get started' the wiki is a thankfull place find a lot of answers and here as well ofcourse.

However I had another look at your light setting and noticed that you're doing it a completely other way then I did so my earlier post isn't very helpfull. Obviously I would advice you to do it more my way but then again every one should learn this their own way!

So:
You need to store a list of the weapons on a library token property.
eg. WeaponList : "SMG, Shotgun, Assault rifle"

The input function will then be:
Code:
<!--the dropdownlist-->
[
h:status=input("Wpn|"+WeaponList +"|Choose Weapon to Display|LIST|SELECT=0")]
[
h:abort(status)]
<!--
and the light settings-->
[
h, if(hasLightSource("Automatics", Wpn+" Short")), CODE:{
[h: setLight("Automatics", Wpn+" Short", 0)]
[h: setLight("Automatics", Wpn+" Medium", 0)]
[h: setLight("Automatics", Wpn+" Long", 0)]
};{
[h: setLight("Automatics", Wpn+" Short", 1)]
[h: setLight("Automatics", Wpn+" Medium", 1)]
[h: setLight("Automatics", Wpn+" Long", 1)]
}]

im forgetting the get the WeaponList from the library token, check the wiki, but I believe its something like:
WeaponList = getLibProperty(WeaponList , "lib:WhateverYouCallIt")
better yet not to use the same names so probly call the property WeaponLibrary : "Shotgun, SMG, etc"
and then
WeaponList = getLibProperty(WeaponLibrary , "lib:WhateverYouCallIt")

_________________

 bmcoomes   Cave Troll Joined: Wed Jan 27, 2010 9:27 pmPosts: 28Location: Ephrata, WA
 Post subject: Re: Light vision Illumination Generator Tool (Excel)Posted: Fri Feb 05, 2010 7:45 am
OK I'm geting an error. Here is what I did. I started small.

Library token property. WeponLibrary : Assault Rifle, SMG, Machine Pistol

then on the campaign tab I have the WeaponImput
Code:
<!--the dropdownlist-->
[h:status=input("Wpn|"+WeaponList+"|Choose Weapon to Display|LIST|SELECT=0")]
[h:abort(status)]
<!--and the light settings-->
[h, if(hasLightSource("Automatics", Wpn+" Short")), CODE:{
[h: setLight("Automatics", Wpn+" Short", 0)]
[h: setLight("Automatics", Wpn+" Medium", 0)]
[h: setLight("Automatics", Wpn+" Long", 0)]
[h: setLight("Automatics", Wpn+"Extreme", 0)]
};{
[h: setLight("Automatics", Wpn+" Short", 1)]
[h: setLight("Automatics", Wpn+" Medium", 1)]
[h: setLight("Automatics", Wpn+" Long", 1)]
[h: setLight("Automatics", Wpn+"Extreme",1)]
}]

then on the Selection tab I have the WeaponList
Code:
[h: WeaponList = getLibProperty(Weaponlibrary, "Lib:SR4")]

and this is what I get in the chat window.
Invalid condition in IF(hasLightSource("Automatics", Wpn+" Short")) roll option.       Statement options (if any): h, if(hasLightSource("Automatics", Wpn+" Short")), CODE       Statement Body (first 200 characters): { [h: setLight("Automatics", Wpn+" Short", 0)] [h: setLight("Automatics", Wpn+" Medium", 0)] [h: setLight("Automatics", Wpn+" Long", 0)] [h: setLight("Automatics", Wpn+"Extreme", 0)] }

 wolph42   Deity Joined: Fri Mar 20, 2009 4:40 amPosts: 6548Location: Netherlands
 Post subject: Re: Light vision Illumination Generator Tool (Excel)Posted: Fri Feb 05, 2010 8:30 am
well... this is the other 50% of the coding: debugging.
I can't find any syntax errors, but then again I might overlook them as well.
First of
Quote:
hen on the Selection tab I have the WeaponList
Code:
[h: WeaponList = getLibProperty(Weaponlibrary, "Lib:SR4")]
What do you mean with that?

The macro in its enitirety should be:
Code:
<!--retrieve library-->
[
h: WeaponList = getLibProperty(Weaponlibrary, "Lib:SR4")]

<!--
the dropdownlist-->
[
h:status=input("Wpn|"+WeaponList+"|Choose Weapon to Display|LIST|SELECT=0")]
[
h:abort(status)]
<!--
and the light settings-->
[
h, if(hasLightSource("Automatics", Wpn+" Short")), CODE:{
[h: setLight("Automatics", Wpn+" Short", 0)]
[h: setLight("Automatics", Wpn+" Medium", 0)]
[h: setLight("Automatics", Wpn+" Long", 0)]
[h: setLight("Automatics", Wpn+"Extreme", 0)]
};{
[h: setLight("Automatics", Wpn+" Short", 1)]
[h: setLight("Automatics", Wpn+" Medium", 1)]
[h: setLight("Automatics", Wpn+" Long", 1)]
[h: setLight("Automatics", Wpn+"Extreme",1)]
}]

Now if that doesn't work, start with putting something in the if() statement to see if the code block actually works, e.g.:
[h, if(0), CODE:{
and see if the lights go on, then
[h, if(1), CODE:{
to see if they go off again.
If so, the problem is in the if statement... go from there

edit: you miss a space before "Extreme" that will generate an error (not THE error, but an error).

_________________

 bmcoomes   Cave Troll Joined: Wed Jan 27, 2010 9:27 pmPosts: 28Location: Ephrata, WA
 Post subject: Re: Light vision Illumination Generator Tool (Excel)Posted: Fri Feb 05, 2010 8:45 am
wolph42 wrote:
well... this is the other 50% of the coding: debugging.
I can't find any syntax errors, but then again I might overlook them as well.
First of
Quote:
Then on the Selection tab I have the WeaponList
Code:
[h: WeaponList = getLibProperty(Weaponlibrary, "Lib:SR4")]
What do you mean with that?

That is perfectly OK, in being a nood at this I had it as it's own macro instead of it with the other coding.

wolph42 wrote:
The macro in its enitirety should be:
Code:
<!--retrieve library-->
[
h: WeaponList = getLibProperty(Weaponlibrary, "Lib:SR4")]

<!--
the dropdownlist-->
[
h:status=input("Wpn|"+WeaponList+"|Choose Weapon to Display|LIST|SELECT=0")]
[
h:abort(status)]
<!--
and the light settings-->
[
h, if(hasLightSource("Automatics", Wpn+" Short")), CODE:{
[h: setLight("Automatics", Wpn+" Short", 0)]
[h: setLight("Automatics", Wpn+" Medium", 0)]
[h: setLight("Automatics", Wpn+" Long", 0)]
[h: setLight("Automatics", Wpn+"Extreme", 0)]
};{
[h: setLight("Automatics", Wpn+" Short", 1)]
[h: setLight("Automatics", Wpn+" Medium", 1)]
[h: setLight("Automatics", Wpn+" Long", 1)]
[h: setLight("Automatics", Wpn+"Extreme",1)]
}]

Now if that doesn't work, start with putting something in the if() statement to see if the code block actually works, e.g.:
[h, if(0), CODE:{
and see if the lights go on, then
[h, if(1), CODE:{
to see if they go off again.
If so, the problem is in the if statement... go from there

edit: you miss a space before "Extreme" that will generate an error (not THE error, but an error).

I fixed the space, and I'm moving on to the testing. I'm geting now a pop up window asking for Input Value for Lib:SR4 "Value For WeaponLibrary" and then it asked Choose Weapon to Display: >dropdown< with only a "0"
The chat output is impersonated "Lib:SR4" with a black entry.

Thanks,
Edit: it's looking like it's not generating the WeaponList so it's not accessing the WeaponLibrary.

Edit 2: I have the idea of attching the campiagn file so you can see whats going on.

 bmcoomes   Cave Troll Joined: Wed Jan 27, 2010 9:27 pmPosts: 28Location: Ephrata, WA
 Post subject: Re: Light vision Illumination Generator Tool (Excel)Posted: Fri Feb 05, 2010 9:23 am
I've fixed the Lib token property I had it formatted wrong so now it's get that information but only have a "0" in the dropdown to "Choose Weapon to Display".

Edit: I found that it's the:
Code:
<!--the dropdownlist-->
[h:status=input("Wpn|"+WeaponList +"|Choose Weapon to Display|LIST|SELECT=0")]
[h:abort(status)]
Portion, in that it's not listing the wepon library which should be Assault Rifle, SMG, Machine Pistol. I can remove it and input the type manually and it works.

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 2 of 3 [ 45 posts ] Go to page Previous  1, 2, 3  Next

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

 Search for: Jump to: Select a forum ------------------ General    Announcements    Ideas for New Applications    General Discussion    Developer Notes       Java Programming Info    User Creations       Requests for HELLLLP!       Tilesets, Token Libraries, and Complete Maps          Token Libraries          Tilesets/Graphics for Map-making          Complete Maps       Campaign Frameworks          D&D 4e Frameworks          [D&D3.5 + Pathfinder] Campaign Macros          Shadowrun 4e Frameworks          Savage Worlds Frameworks       Published Module Support       Tutorials          Graphics, Images, Tokens, Maps          Drop-In Macros and Scripts          Campaign Frameworks       Drop-In Macro Resources    Links & External Resources    Looking For Group       "Living" Campaigns       Dungeons and Dragons       Savage Worlds       WoD       Wargaming    Documentation Requests/Discussion    Session Report-Back Tools    MapTool       How To       Macros       Feature Requests          Resolved       Bug Reports          Resolved       WIP - User FAQ       Testing    TokenTool    DiceTool    InitiativeTool    CharacterTool       Support: d20 D&D       Support: D&D 4e       Support: Hero System       Support: Savage Worlds       Support: GURPS Other    RPTools Sightings    Running Campaigns       Thiera's College of Adventurers       Age of Might       Scales of War       Renwold       Dead Men Walking       Dark Sun - 4th Edition       Warhammer Fantasy Roleplay       Return of Uchly Namen       Insert Campaign Here       Antium       The Mystic Moon       World of Lagal       GangerRun       FB Scales of War       Sellswords of Eberron          Archive       Orbs of Chaos       World of Omegus       Keep on the Shadowfell - 4E       Rise of the Runelords       Aurith In The Age Of Steam       Widdershins       Nos's Pathfinder Campaign       Falcons Hollow       Verwirrte Welten       With it or on it

### Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (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 3 guests