What Am I Doing Wrong 3

I need help figuring out exactly how to get this to work, an explanation would be nice. Also, it is based on a spell called wizard's harvest but I made the money have 100=1USD.


  • I fixed a few syntax errors and added comments about what I did. It runs and gives error free output now. But... I don't entirely know what its supposed to do, and I'm a bit to sleepy to really understand the notes you have in the file. I think this should get you started, and I can look at it further in a day or two (after some sleep)... Just cut and paste it into your generator or a new ipt file and the green comments will explain what I modified and why.

    ;First of all, mine is going to be based on the spell Wizard's Harvest spell from Elona or Eternal League of Nefia In it, each casting of the spell can roll several times in once instance, and each time it is rolled is considered an item. The number of rolls is determined as follows: {4 +{1d{SpellPower/50}+1}} The spell power only affects how much actual money is produced per item rolled, and in my game 100 is roughly equal to a Unites States Dollar, the formula is {400 + {1d{SpellPower}.
    ;Rule: For every item, a set of rolls is made to determine what is generated. 
    ;100% - Gold
    ;1.1% - Platinum Coin
    ;2% - Ancient Book
    ;.5% - Small Medal
    ;.067% - Treasure Map
    ;I have no idea how to roll from the prompt in this case considering I need to roll based on the spell level to determine spell power.
    ; Wizard's Harvest.ipt
    ; created 5/11/2020 12:25:43 AM
    Prompt: Spell level {1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30} 1
    Table: Main
    [@{50+(10*{$prompt1})} item]  //just a slight syntax change: @ gives you multiple rolls on a table, prompt is $ as in {$prompt1} and used regular () around 10* operator; I dropped the implode and in instead used a \n in Table:item
    Table: item          
    Define:dice={1d10000} // used d10000 so I could evaluate 0.67%... that's a 67 or less on a d10,000. for define, everytime it sees {dice} it rolls a new 1d10000. Otherwise you could use SET: and it would just roll once and apply that value to everything - with set a roll of 65 would give you one of each item.
    ;[@money], not sure what money is or does
    [@gcoin], [when]{dice}<110[do][@pcoin][end], [when]{dice}<2000[do][@book][end], [when]{dice}<67[do][@treasureMap][end]\n// added /n to insert a line return after each roll.... used book < 200 or 20% instead of 2% so that I could see if book was coming up about 1 out of 5 rolls. Change it back to <20 once youre satisfied its working.
    Table: money
    {1d100} money
    Table: gcoin
    {1d100} gold   //just stuck a random number of gold here to verify output works. this table can be anything you want.
    Table: pcoin
    {1d100} platinum
    Table: book
    1 book
    Table: treasureMap
    1 map
    //if it doesn't roll on the table, it still commas separating the blank non-roll... there are ways to clean up the output to eliminate the commas.
  • I cleaned up the output a good bit, added some better comments about how some of the calls work, fixed my MaxReps error, and added a summation of the total of all the rolls. Hope this helps.

  • Thanks, the gold area actually coins to be used as trade items for more common stuff while the platinum is for extremely rare stuff. The money (actually called Jewels) is what should be 100% and the gold should be about 5%. I'll see if I can do that before I come ask for help.

Leave a Comment