5E Character Create Playlist
Page 8 of 18 First ... 678910 ... Last

Thread: AD&D Ruleset

  1. #71
    Awesome. Maybe you might find some extra gaming now that you have online as an option also; so tough getting our old gaming buddies together again IRL. FG does make for a really good IRL gaming experience as well though, with the manual dice input and the ability to project maps onto a flatscreen monitor lied flat; which is what some of our users do. Hope you enjoy the ruleset.
    Ultimate License Holder GM

    Games currently Playing: AD&D, DCC RPG and D&D 5e

    Finished Projects: AD&D Ruleset
    New School NPC Maker 5E
    New School NPC Maker PFRPG - 3.5E
    Old School NPC Maker

    Current Projects:

    1) Adventure Module.
    2) Maintaining and improving released projects.
    3) C.O.O.L. Beasts
    4) Basic Fantasy Ruleset
    5) Metamorphosis Alpha Ruleset

  2. #72
    I finally made a breakthru on the Multi-Classing Code for Saving Throws. Had to use some twisted logic.

    Code:
    function onSourceUpdate()
    					local nodeWin = window.getDatabaseNode();
    					local nLevel = DB.getValue(nodeWin, "classes.slot1.level", 0);
    					local nLevel2 = DB.getValue(nodeWin, "classes.slot1.level2", 0);
    					local nLevel3 = DB.getValue(nodeWin, "classes.slot1.level3", 0);
    					local sCurrentClass = DB.getValue(nodeWin, "classes.slot1.name", "Thief");
    					sCurrentClass = string.lower(sCurrentClass);
    					local sCurrentClass2 = DB.getValue(nodeWin, "classes.slot1.name2", "Thief");
    					sCurrentClass2 = string.lower(sCurrentClass2);
    					local sCurrentClass3 = DB.getValue(nodeWin, "classes.slot1.name3", "Thief");
    					sCurrentClass3 = string.lower(sCurrentClass3);
    					local nSavingThrowMod = 0;
    					local nSavingThrowMod2 = 0;
    					local nSavingThrowMod3 = 0;
    					
    					if string.match(sCurrentClass, "fig") or string.match(sCurrentClass, "pal") or string.match(sCurrentClass, "ran") then
    						nSavingThrow = GameSystem.getSavingThrowsFighterParalyzation(nLevel) + calculateSources();
    						setValue(nodeWin, "save.paralyzation.score", "number", nSavingThrow);
    					elseif string.match(sCurrentClass, "thi") or string.match(sCurrentClass, "rog")
    								or string.match(sCurrentClass, "***") or string.match(sCurrentClass, "mon") then
    						nSavingThrow = GameSystem.getSavingThrowsThiefParalyzation(nLevel) + calculateSources();
    						setValue(nodeWin, "save.paralyzation.score", "number", nSavingThrow);
    					elseif string.match(sCurrentClass, "cle") or string.match(sCurrentClass, "dru") or string.match(sCurrentClass, "pri") then
    						nSavingThrow = GameSystem.getSavingThrowsClericParalyzation(nLevel) + calculateSources();
    						setValue(nodeWin, "save.paralyzation.score", "number", nSavingThrow);
    					elseif string.match(sCurrentClass, "mag") or string.match(sCurrentClass, "wiz") or string.match(sCurrentClass, "ill") then
    						nSavingThrow = GameSystem.getSavingThrowsMagicUserParalyzation(nLevel) + calculateSources();
    						setValue(nodeWin, "save.paralyzation.score", "number", nSavingThrow);
    					else
    						nSavingThrow = GameSystem.getSavingThrowsNoClass(nLevel) + calculateSources();
    						setValue(nodeWin, "save.paralyzation.score", "number", nSavingThrow);
    					end
    					
    					if string.match(sCurrentClass2, "fig") or string.match(sCurrentClass2, "pal") or string.match(sCurrentClass2, "ran") then
    						nSavingThrow2 = GameSystem.getSavingThrowsFighterParalyzation(nLevel2) + calculateSources();
    					elseif string.match(sCurrentClass2, "thi") or string.match(sCurrentClass2, "rog")
    								or string.match(sCurrentClass2, "***") or string.match(sCurrentClass2, "mon") then
    						nSavingThrow2 = GameSystem.getSavingThrowsThiefParalyzation(nLevel2) + calculateSources();
    					elseif string.match(sCurrentClass2, "cle") or string.match(sCurrentClass2, "dru") or string.match(sCurrentClass2, "pri") then
    						nSavingThrow2 = GameSystem.getSavingThrowsClericParalyzation(nLevel2) + calculateSources();
    					elseif string.match(sCurrentClass2, "mag") or string.match(sCurrentClass2, "wiz") or string.match(sCurrentClass2, "ill") then
    						nSavingThrow2 = GameSystem.getSavingThrowsMagicUserParalyzation(nLevel2) + calculateSources();
    					else 
    						nSavingThrow2 = nSavingThrow
    					end
    					
    					
    						nSavingThrowMod = nSavingThrow - nSavingThrow2;
    						if nSavingThrowMod > 0 then
    							setValue(nodeWin, "save.paralyzation.score", "number", nSavingThrow2);
    						end
    					
    					
    					if string.match(sCurrentClass3, "fig") or string.match(sCurrentClass3, "pal") or string.match(sCurrentClass3, "ran") then
    						nSavingThrow3 = GameSystem.getSavingThrowsFighterParalyzation(nLevel3) + calculateSources();
    					elseif string.match(sCurrentClass3, "thi") or string.match(sCurrentClass3, "rog")
    								or string.match(sCurrentClass3, "***") or string.match(sCurrentClass3, "mon") then
    						nSavingThrow3 = GameSystem.getSavingThrowsThiefParalyzation(nLevel3) + calculateSources();
    					elseif string.match(sCurrentClass3, "cle") or string.match(sCurrentClass3, "dru") or string.match(sCurrentClass3, "pri") then
    						nSavingThrow3 = GameSystem.getSavingThrowsClericParalyzation(nLevel3) + calculateSources();
    					elseif string.match(sCurrentClass3, "mag") or string.match(sCurrentClass3, "wiz") or string.match(sCurrentClass3, "ill") then
    						nSavingThrow3 = GameSystem.getSavingThrowsMagicUserParalyzation(nLevel3) + calculateSources();
    					else
    						nSavingThrow3 = nSavingThrow2
    					end
    					
    					
    						nSavingThrowMod2 = nSavingThrow2 - nSavingThrow3;
    						nSavingThrowMod3 = nSavingThrow - nSavingThrow3
    						if nSavingThrowMod3 > 0 and nSavingThrowMod2 > 0 then
    							setValue(nodeWin, "save.paralyzation.score", "number", nSavingThrow3);
    						end
    					
    				end
    				
    				function onInit()
    					local nodeWin = window.getDatabaseNode();
    					DB.addHandler(DB.getPath(nodeWin, "classes.slot1.level"), "onUpdate", onSourceUpdate);
    					DB.addHandler(DB.getPath(nodeWin, "classes.slot1.level2"), "onUpdate", onSourceUpdate);
    					DB.addHandler(DB.getPath(nodeWin, "classes.slot1.level3"), "onUpdate", onSourceUpdate);
    					DB.addHandler(DB.getPath(nodeWin,"classes.slot1.name"), "onUpdate", onSourceUpdate);
    					DB.addHandler(DB.getPath(nodeWin,"classes.slot1.name2"), "onUpdate", onSourceUpdate);
    					DB.addHandler(DB.getPath(nodeWin,"classes.slot1.name3"), "onUpdate", onSourceUpdate);
    					super.onInit();
    				end
    Last edited by vodokar; February 7th, 2017 at 05:31.
    Ultimate License Holder GM

    Games currently Playing: AD&D, DCC RPG and D&D 5e

    Finished Projects: AD&D Ruleset
    New School NPC Maker 5E
    New School NPC Maker PFRPG - 3.5E
    Old School NPC Maker

    Current Projects:

    1) Adventure Module.
    2) Maintaining and improving released projects.
    3) C.O.O.L. Beasts
    4) Basic Fantasy Ruleset
    5) Metamorphosis Alpha Ruleset

  3. #73
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    I love it! Well done!
    No freaking way im reading all that code though.

  4. #74
    That's kinda the point. The TL;DR version = it was complicated.

    Got it fully implemented for all 5 saving throws.

    Code:
    if I_Feel_Like_IT == True then
    	will.workon_CombatCode(tommorrow);
    else
    	will.release(tommorrow, Multi-Classed Saving Throws)
    		if start.speak.code then
    			worktoolong == true
    		end
    				
    end
    
    Draw.SmileyFace
    Also finally got those sidebar buttons moved to the proper place.
    Last edited by vodokar; February 7th, 2017 at 07:04.
    Ultimate License Holder GM

    Games currently Playing: AD&D, DCC RPG and D&D 5e

    Finished Projects: AD&D Ruleset
    New School NPC Maker 5E
    New School NPC Maker PFRPG - 3.5E
    Old School NPC Maker

    Current Projects:

    1) Adventure Module.
    2) Maintaining and improving released projects.
    3) C.O.O.L. Beasts
    4) Basic Fantasy Ruleset
    5) Metamorphosis Alpha Ruleset

  5. #75

    Join Date
    Jun 2013
    Location
    Isanti, MN
    Posts
    2,922
    Why didn't you just setup a table keyed by class name and pull the needed value out of the table?

  6. #76
    I guess the simplest answer to that is that I don't know how to do that, if I understand your question. I used functions to store the values and pull them when needed, because I knew how to do that. Since I already knew that would work, I didn't see any reason to try to find a different solution to something I already knew how to do.

    At any rate, saving and getting the data wasn't the problem. Getting it to decide which of the three saving throw values possible (one value for each potential class of the multi-classed character) to use was.

    As I said, I solved that problem, so, it now works. It might not be how you would have done it, but it doesn't matter, because it works. There are always multiple ways to go about something; the only thing that matters is that it works.
    Last edited by vodokar; February 8th, 2017 at 00:11.
    Ultimate License Holder GM

    Games currently Playing: AD&D, DCC RPG and D&D 5e

    Finished Projects: AD&D Ruleset
    New School NPC Maker 5E
    New School NPC Maker PFRPG - 3.5E
    Old School NPC Maker

    Current Projects:

    1) Adventure Module.
    2) Maintaining and improving released projects.
    3) C.O.O.L. Beasts
    4) Basic Fantasy Ruleset
    5) Metamorphosis Alpha Ruleset

  7. #77

    Join Date
    Jun 2013
    Location
    Isanti, MN
    Posts
    2,922
    No guarantee this will work as written, I'm just whipping it up off the top of my head, but something like this:

    Code:
        tSavingThrows = {
            paralyzation = {
                fighter = { 1=14, 2=14, 3=13, 4=13, ... }
                thief = { 1=13, 2=13, 3=13, 4=13, ... }
                ...
            },
            rod = {
                ...
            },
            ...
        }
        nSavingThrow = tSavingThrows[sThrowType][sCurrentClass][nLevel] + CalculateSources();
        nSavingThrow2 = tSavingThrows[sThrowType][sCurrentClass2][nLevel2] + CalculateSources();
        nSavingThrow3 = tSavingThrows[sThrowType][sCurrentClass3][nLevel3] + CalculateSources();
        ...

  8. #78
    Always glad to learn something new. I'll remember that for next time. No reason to change what I have now.
    Ultimate License Holder GM

    Games currently Playing: AD&D, DCC RPG and D&D 5e

    Finished Projects: AD&D Ruleset
    New School NPC Maker 5E
    New School NPC Maker PFRPG - 3.5E
    Old School NPC Maker

    Current Projects:

    1) Adventure Module.
    2) Maintaining and improving released projects.
    3) C.O.O.L. Beasts
    4) Basic Fantasy Ruleset
    5) Metamorphosis Alpha Ruleset

  9. #79
    leozelig's Avatar
    Join Date
    Jun 2007
    Location
    Eastern USA
    Posts
    1,852
    Blog Entries
    1
    The OSRIC ruleset uses tables for a bunch of stuff. It might be worth digging through since you might be able to borrow some code. "To hit" tables with repeating 20's were definitely in there.

  10. #80
    I will likely take a look in order to increase my programming toolbox, however, I have no plans to change things that are already working. Better to spend my time adding features to the existing ruleset and looking forward to the next project.
    Ultimate License Holder GM

    Games currently Playing: AD&D, DCC RPG and D&D 5e

    Finished Projects: AD&D Ruleset
    New School NPC Maker 5E
    New School NPC Maker PFRPG - 3.5E
    Old School NPC Maker

    Current Projects:

    1) Adventure Module.
    2) Maintaining and improving released projects.
    3) C.O.O.L. Beasts
    4) Basic Fantasy Ruleset
    5) Metamorphosis Alpha Ruleset

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in