It looks like you're new here. If you want to get involved, click one of these buttons!
Im stuck on the beginning testing of a pokemon encounter generatior. OnPath doesnt print anying with no Console info.
Test Cod:
Prompt: RouteInfo {OffPath|OnPath} OffPath
Define:Route={$prompt1}
Table: Main
Type: Lookup
Roll: {1d2}
1:{[Define: Pokemon=pidgey]}[when]{$route}=OffPath[do][@Check1][else][@Check2][end]
2:{[Define: Pokemon=seedot]}[when]{$route}=OffPath[do][@Check1][else][@Check2][end]
Endtable
Table: Check1
Type: Lookup
Roll: {1d2}
1:[Define: Pokemon=wurple]
2:[Define: Pokemon=wooloo]
Endtable
Table: Check2
Type: Lookup
Roll: 1
1: {$Pokemon}
If you could please explain to me what I'm doing wrong that would be great. This is only going to get more complicated and I'm tripping on an early hurdle
Comments
Don't use Define for things inside a table. That's only for definitions at the top, before your tables start.
[Pokemon=pidgey]will assign the Pokemon variable a value of "pidgey", and also display "pidgey".
[Pokemon==pidgey]with a double equals sign will assign the value without displaying anything, which is probably what you want for the assignments in Main. You also don't need the Endtable lines. So you could just have:
You can also use the prompt as the table name, instead of using the [when] tag.
So Ive been working on this generator for pokemon and have been running into issues. The biggest is that Night pokemon are generating when set to day. The tables name also appears in the table sometimes and i am unable to find the typo creating it. Help or advise would be greatly appreciated.
Prompt: RouteInfo {RandPath|OnPath|Lake|River|Pond|Thorny|Flower|Rocky} OnPath
Prompt: Season {Warm|Chill} Warm
Prompt: Number of Successes {} 1
Prompt: Time of Day {Day|Night} Day
Define:Route={$prompt1}
Define:season={$prompt2}
Define:Success={$prompt3}
Define:Day={$prompt4}
Table: Main
[#{$Success} Spawner]
Table: Spawner
Type: Lookup
1:[@MainCommon{$season}]
2:[@2 MainCommon{$Season}]
3:[@MainUncommon{$Season}] [@2 MainCommon{$Season}]
4:[@2 MainUncommon{$Season}] [@2 MainCommon{$Season}]
5:[@MainRare{$Season}] [@2 MainUncommon{$Season}] [@3 MainCommon{$Season}]
6:[@2 MainRare{$Season}] [@ 2MainUncommon{$Season}] [@3 MainCommon{$Season}]
7:[@MainVeryRare{$Season}] [@2 MainRare{$Season}] [@3 MainUncommon{$Season}] [@4 MainCommon{$Season}]
8:[@MainVeryRare{$Season}] [@3 MainRare{$Season}] [@3 MainUncommon{$Season}] [@4 MainCommon{$Season}]
9:[@2 MainVeryRare{$Season}] [@3 MainRare{$Season}] [@3 MainUncommon{$Season}] [@4 MainCommon{$Season}]
10:[@MainSuperRare{$Season}] [@2 MainVeryRare{$Season}] [@3 MainRare{$Season}] [@4 MainUncommon{$Season}] [@5 MainCommon{$Season}]
11:[@MainSuperRare{$Season}] [@2 MainVeryRare{$Season}] [@3 MainRare{$Season}] [@4 MainUncommon{$Season}] [@6 MainCommon{$Season}]
12:[@MainSuperRare{$Season}] [@2 MainVeryRare{$Season}] [@3 MainRare{$Season}] [@5 MainUncommon{$Season}] [@6 MainCommon{$Season}]
13:[@MainSuperRare{$Season}] [@2 MainVeryRare{$Season}] [@4 MainRare{$Season}] [@5 MainUncommon{$Season}] [@7 MainCommon{$Season}]
14:[@MainSuperRare{$Season}] [@3 MainVeryRare{$Season}] [@4 MainRare{$Season}] [@5 MainUncommon{$Season}] [@7 MainCommon{$Season}]
15:[@2 MainSuperRare{$Season}] [@3 MainVeryRare{$Season}] [@4 MainRare{$Season}] [@6 MainUncommon{$Season}] [@7 MainCommon{$Season}]
Table: MainCommonWarm
[Pokemon==Pidgey][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
[Pokemon==Rattata][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
[Pokemon==Sunkern][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
[Pokemon==Starly][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
[Pokemon==Electrike][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
[Pokemon==Lechonk][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
[Pokemon==Ekans][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
Table: MainCommonChill
[Pokemon==Hoppip][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
[Pokemon==Bunnelby][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
[Pokemon==Kricketot][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
[Pokemon==Wooloo][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
[Pokemon==Lillipup][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
[Pokemon==Gossifleur][when]{$route}=OnPath[do][@Common{$day}Check][else][@{$route}Common{$season}][end]
Table: MainUncommonWarm
[Pokemon==Minccino][when]{$route}=OnPath[do][@Uncommon{$day}Check][else][@{$route}Uncommon{$season}][end]
[Pokemon==Ponyta][when]{$route}=OnPath[do][@Uncommon{$day}Check][else][@{$route}Uncommon{$season}][end]
[Pokemon==Farfetchd][when]{$route}=OnPath[do][@Uncommon{$day}Check][else][@{$route}Uncommon{$season}][end]
[Pokemon==GZigzagoon][when]{$route}=OnPath[do][@Uncommon{$day}Check][else][@{$route}Uncommon{$season}][end]
[Pokemon==Scraggy][when]{$route}=OnPath[do][@Uncommon{$day}Check][else][@{$route}Uncommon{$season}][end]
[Pokemon==Lillipup][when]{$route}=OnPath[do][@Uncommon{$day}Check][else][@{$route}Uncommon{$season}][end]
Table: MainUncommonChill
[Pokemon==Pidgey][when]{$route}=OnPath[do][@Uncommon{$day}Check][else][@{$route}Uncommon{$season}][end]
[Pokemon==Rattata][when]{$route}=OnPath[do][@Uncommon{$day}Check][else][@{$route}Uncommon{$season}][end]
[Pokemon==Ponyta][when]{$route}=OnPath[do][@Uncommon{$day}Check][else][@{$route}Uncommon{$season}][end]
[Pokemon==Electrike][when]{$route}=OnPath[do][@Uncommon{$day}Check][else][@{$route}Uncommon{$season}][end]
[Pokemon==Espurr][when]{$route}=OnPath[do][@Uncommon{$day}Check][else][@{$route}Uncommon{$season}][end]
Table: MainRareWarm
[Pokemon==Miltank][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==Tauros][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==Plusle][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==Minun][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==Rockruff][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==Vulpix][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==Swablu][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==Hawlucha][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
Table: MainRareChill
[Pokemon==Miltank][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==Tauros][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==Pawmi][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==Rhyhorn][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==AVulpix][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==Swablu][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
[Pokemon==Electabuzz][when]{$route}=OnPath[do][@Rare{$day}Check][else][@{$route}Rare{$season}][end]
Table: MainVeryRareWarm
[Pokemon==Cyclizar][when]{$route}=OnPath[do][@VeryRare{$day}Check][else][@{$route}VeryRare{$season}][end]
[Pokemon==Dunsparce][when]{$route}=OnPath[do][@VeryRare{$day}Check][else][@{$route}VeryRare{$season}][end]
[Pokemon==Chansey][when]{$route}=OnPath[do][@VeryRare{$day}Check][else][@{$route}VeryRare{$season}][end]
[Pokemon==Turtwig][when]{$route}=OnPath[do][@VeryRare{$day}Check][else][@{$route}VeryRare{$season}][end]
Table: MainVeryRareChill
[Pokemon==Chansey][when]{$route}=OnPath[do][@VeryRare{$day}Check][else][@{$route}VeryRare{$season}][end]
[Pokemon==Turtwig][when]{$route}=OnPath[do][@VeryRare{$day}Check][else][@{$route}VeryRare{$season}][end]
Table: MainSuperRareChill
[Pokemon==Togepi][when]{$route}=OnPath[do][@SuperRare{$day}Check][else][@{$route}SuperRare{$season}][end]
[Pokemon==Ditto][when]{$route}=OnPath[do][@SuperRare{$day}Check][else][@{$route}SuperRare{$season}][end]
Table: MainSuperRareChill
[Pokemon==Ditto][when]{$route}=OnPath[do][@SuperRare{$day}Check][else][@{$route}SuperRare{$season}][end]
Table: RockyCommonWarm
[Pokemon==Dewebble][@Common{$day}Check]
[@Common{$day}Check]
Table: RockyCommonChill
[Pokemon==Lechonk][@Common{$day}Check]
[@Common{$day}Check]
Table: RockyUncommonWarm
[Pokemon==Capsakid][@Uncommon{$day}Check]
[Pokemon==Wooloo][@Uncommon{$day}Check]
[Pokemon==Bunnelby][@Uncommon{$day}Check]
[Pokemon==Pidove][@Uncommon{$day}Check]
[Pokemon==Sandshrew][@Uncommon{$day}Check]
[@Uncommon{$day}Check]
Table: RockyUncommonChill
[Pokemon==Ekans][@Uncommon{$day}Check]
[Pokemon==G.Zigzagoon][@Uncommon{$day}Check]
[Pokemon==Starly][@Uncommon{$day}Check]
[Pokemon==Diglett][@Uncommon{$day}Check]
[Pokemon==Minccino][@Uncommon{$day}Check]
[Pokemon==Sandshrew][@Uncommon{$day}Check]
[@Uncommon{$day}Check]
Table: RockyRareWarm
[Pokemon==Rhyhorn][@Rare{$day}Check]
[Pokemon==Diglett][@Rare{$day}Check]
[Pokemon==Electabuzz][@Rare{$day}Check]
[Pokemon==Pawmi][@Rare{$day}Check]
[@Rare{$day}Check]
Table: RockyRareChill
[Pokemon==Scraggy][@Rare{$day}Check]
[Pokemon==Hawlucha][@Rare{$day}Check]
[Pokemon==Tepig][@Rare{$day}Check]
[@Rare{$day}Check]
Table: RockyVeryRareWarm
[Pokemon==Skinka][@VeryRare{$day}Check]
[Pokemon==Tepig][@VeryRare{$day}Check]
[@VeryRare{$day}Check]
Table: RockyVeryRareChill
[Pokemon==Dunsparce][@VeryRare{$day}Check]
[Pokemon==Cyclizar][@VeryRare{$day}Check]
[@VeryRare{$day}Check]
Table: RockySuperRareWarm
[Pokemon==Ditto][@SuperRare{$day}Check]
[@SuperRare{$day}Check]
Table: RockySuperRareChill
[Pokemon==Ditto][@SuperRare{$day}Check]
[@SuperRare{$day}Check]
Table: ThornyCommonWarm
[Pokemon==Bounsweet][@Uncommon{$day}Check]
[@Common{$day}Check]
Table: ThornyCommonChill
[Pokemon==Ferroseed][@Uncommon{$day}Check]
[@Common{$day}Check]
Table: ThornyUncommonWarm
[Pokemon==Ferroseed][@Uncommon{$day}Check]
[Pokemon==Gossifleur][@Uncommon{$day}Check]
[Pokemon==Spearow][@Uncommon{$day}Check]
[Pokemon==Bunnelby][@Uncommon{$day}Check]
[@Uncommon{$day}Check]
Table: ThornyUncommonChill
[Pokemon==NidoranB][@Uncommon{$day}Check]
[Pokemon==Roselia][@Uncommon{$day}Check]
[Pokemon==NidoranG][@Uncommon{$day}Check]
[Pokemon==Bounsweet][@Uncommon{$day}Check]
[@Uncommon{$day}Check]
Table: ThornyRareWarm
[Pokemon==Pawniard][@Rare{$day}Check]
[Pokemon==Bramblin][@Rare{$day}Check]
[Pokemon==Shellmet][@Rare{$day}Check]
[@Rare{$day}Check]
Table: ThornyRareChill
[Pokemon==Scatterbug][@Rare{$day}Check]
[Pokemon==Spearow][@Rare{$day}Check]
[Pokemon==Pawniard][@Rare{$day}Check]
[Pokemon==Togedemaru][@Rare{$day}Check]
[@Rare{$day}Check]
Table: ThornyVeryRareWarm
[Pokemon==Togedemaru][@VeryRare{$day}Check]
[Pokemon==Shuckle][@VeryRare{$day}Check]
[Pokemon==Chespin][@VeryRare{$day}Check]
[@VeryRare{$day}Check]
Table: ThornyVeryRareChill
[Pokemon==Shuckle][@VeryRare{$day}Check]
[Pokemon==Chespin][@VeryRare{$day}Check]
[@VeryRare{$day}Check]
Table: ThornySuperRareWarm
[Pokemon==Ditto][@SuperRare{$day}Check]
[@SuperRare{$day}Check]
Table: ThornySuperRareChill
[Pokemon==Ditto][@SuperRare{$day}Check]
[@SuperRare{$day}Check]
Table: FlowerCommonWarm
[Pokemon==Cutiefly][@Common{$day}Check]
[Pokemon==Scatterbug][@Common{$day}Check]
[Pokemon==Kricketot][@Common{$day}Check]
[Pokemon==Minccino][@Common{$day}Check]
[@Common{$day}Check]
Table: FlowerCommonChill
[@Common{$day}Check]
Table: FlowerUncommonWarm
[Pokemon==Spritzee][@Uncommon{$day}Check]
[Pokemon==Espurr][@Uncommon{$day}Check]
[Pokemon==Flebebe][@Uncommon{$day}Check]
[Pokemon==NidoranB][@Uncommon{$day}Check]
[Pokemon==NidoranG][@Uncommon{$day}Check]
[Pokemon==Volbeat][@Uncommon{$day}Check]
[Pokemon==Illumise][@Uncommon{$day}Check]
[@Uncommon{$day}Check]
Table: FlowerUncommonChill
[Pokemon==Milcery][@Uncommon{$day}Check]
[Pokemon==Sunkern][@Uncommon{$day}Check]
[@Uncommon{$day}Check]
Table: FlowerRareWarm
[Pokemon==Oricorio][@Rare{$day}Check]
[Pokemon==Dendenne][@Rare{$day}Check]
[Pokemon==Milcery][@Rare{$day}Check]
[Pokemon==Karrablast][@Rare{$day}Check]
[@Rare{$day}Check]
Table: FlowerRareChill
[Pokemon==Cutiefly][@Rare{$day}Check]
[Pokemon==Spritzee][@Rare{$day}Check]
[Pokemon==Flabebe][@Rare{$day}Check]
[Pokemon==Shellmet][@Rare{$day}Check]
[@Rare{$day}Check]
Table: FlowerVeryRareWarm
[Pokemon==Chikorita][@VeryRare{$day}Check]
[Pokemon==Comfey][@VeryRare{$day}Check]
[@VeryRare{$day}Check]
Table: FlowerVeryRareChill
[Pokemon==Oricorio][@VeryRare{$day}Check]
[Pokemon==Dendenne][@VeryRare{$day}Check]
[Pokemon==Minun][@VeryRare{$day}Check]
[Pokemon==Plusle][@VeryRare{$day}Check]
[@VeryRare{$day}Check]
Table: FlowerSuperRareWarm
[Pokemon==H. Voltorb][@SuperRare{$day}Check]
[@SuperRare{$day}Check]
Table: FlowerSuperRareChill
[Pokemon==Comfey][@SuperRare{$day}Check]
[Pokemon==Chikorita][@SuperRare{$day}Check]
[@SuperRare{$day}Check]
Table: PondCommonWarm
[Pokemon==Surskit][@Common{$day}Check]
[Pokemon==Lotad][@Common{$day}Check]
[Pokemon==Poliwag][@Common{$day}Check]
[@Common{$day}Check]
Table: PondCommonChill
[@Common{$day}Check]
Table: PondUncommonWarm
[Pokemon==Wooper][@Uncommon{$day}Check]
[Pokemon==Wingul][@Uncommon{$day}Check]
[Pokemon==Chewtle][@Uncommon{$day}Check]
[@Uncommon{$day}Check]
Table: PondUncommonChill
[Pokemon==Shellmet][@Uncommon{$day}Check]
[@Uncommon{$day}Check]
Table: PondRareWarm
[Pokemon==Corphish][@Rare{$day}Check]
[Pokemon==Dewpider][@Rare{$day}Check]
[@Rare{$day}Check]
Table: PondRareChill
[Pokemon==Chewtle][@Rare{$day}Check]
[Pokemon==Poliwag][@Rare{$day}Check]
[@Rare{$day}Check]
Table: PondVeryRareWarm
[Pokemon==Sobble][@VeryRare{$day}Check]
[Pokemon==Quaxly][@VeryRare{$day}Check]
[@VeryRare{$day}Check]
Table: PondVeryRareChill
[Pokemon==Sunskit][@VeryRare{$day}Check]
[Pokemon==Wooper][@VeryRare{$day}Check]
[@VeryRare{$day}Check]
Table: PondSuperRareWarm
[@SuperRare{$day}Check]
Table: SuperPondRareChill
[Pokemon==Sobble][@SuperRare{$day}Check]
[Pokemon==Quaxly][@SuperRare{$day}Check]
[@SuperRare{$day}Check]
Table: CommonNightCheck
[Pokemon==Zubat][@Output]
[Pokemon==Ledyba][@Output]
[Pokemon==Gastly][@Output]
[Pokemon==Nymble][@Output]
[@Output]
Table:CommonDayCheck
[@Output]
Table:UncommonNightCheck
[Pokemon==Poochyena][@Output]
[Pokemon==Illumise][@Output]
[Pokemon==Volbeat][@Output]
[Pokemon==Zigzagoon][@Output]
[@Output]
Table:UncommonDayCheck
[@Output]
Table: RareNightCheck
[Pokemon==Nickit][@Output]
[Pokemon==Drowzee][@Output]
[Pokemon==Houndour][@Output]
[@Output]
Table:RareDayCheck
[@Output]
Table:VeryRareNightCheck
[@Output]
Table:VeryRareDayCheck
[@Output]
Table:SuperRareDayCheck
[@Output]
Table:SuperRareNightCheck
[@Output]
Table: Output
[@{$Pokemon}]
When I'm having trouble, what I typically do is add entries to suspect tables to see what is going on. So for example in your first table I might add spawner1, spawner2, etc just as text on each line. Then when the generator runs, that shows me which line ran, and if something was weird that says which way I need to trace it. (You can also add some spaces etc to make it easier to read.)
If it also depends on a variable (other than a prompt), I might also have those lines display the values for the relevant variables.
Once everything is working, I can take out those things, they are just there for debugging purposes.
Often a quick way to find the culprit is to remove stuff until the problem goes away.
You can also look at the Console tab (after you click Go) to see if there are warnings such as missing tables. When you use variables in table names, that can happen because the variable's value might not match a table name. Case doesn't matter in that context, but it needs to be a character-by-character match otherwise.
I'll often insert things like /{day}/ at various points to see if the variable (day, in this example) has the expected value. I include the slashes to help show when a variable is empty (or undefined) or whether it has leading or trailing spaces I wasn't expecting.