Danimal {l Wrote}:Hello BZT, even thought its a nice basic generator is too limited.
No, it's not you just didn't understood how it works. It can be used to generate any item configuration you want.
Danimal {l Wrote}:You see, the idea i had is being able to input the item level, plus the stat gain per level (like Lv3 sword with gains of Min 1-Max 3 gives swords of damage ranging 3-9 points at random), since there are basically 3 damage types on Flare i would check the weapon circle button and then Melee/magic/ranged damage in the now empty combox under weapon (or any kind of similar control object). Armor is similar in which instead of having damage ranges (like dmg=melee,3,9; dmg=ment,3,9; dmg=ranged,3,9) has Absortion (abs=2,4). "Others" just means its not a weapon or amor so it doesnt need those values (more on this later); You got pretty well the starting and finish id.
You should have a json for each of those. Values can be generated randomly, and they can be shifted by an offset using the "add" field if needed.
Danimal {l Wrote}:The middle column with requeriment need to check any of the four stats and press 70%,50%,30% button. This outputs the item 70%,50%,30% level * 5 (char stat gain per lv) of the needed stat to wear, as a line into the extra input data textbox. Ex:
This means you'll have to create a json for each of these combinations. Where you say you a press a 70%,50%,30% button, I say pick one of the jsons.
Danimal {l Wrote}:So if i press Dextery 75% and Strenght 30%, this should appear into the extra input data textbox.
requires_stat=offense,7
requires_stat=physical,3
You should have a json with
- {l Code}: {l Select All Code}
"name": "requires_stat", "value": "offense,7"
"name": "requires_stat", "value": "physical,3"
Since you're using only 4 percentages, there are not so many combinations. But if I were you, I'd use an INCLUDE for each combination, that would simplify your items greatly.
Danimal {l Wrote}:Why that mysterious extra input data textbox? That box would contain any object declaration or requeriments i add in the future and doesnt exist yet.
Yeah, I've figured that. That's why I've told you that you haven't understood how my tool works. It has NOTHING hadwired, except for the id of course. If in the future you want to add new declarations, just add them to the json, and those fields will be dumped to the output as well.
Danimal {l Wrote}:Ideally, there would be buttoms for the most used item definitions in the empty space over the textbox, so i can just press it and it gets added (like rings or swords definition).
For those most used combinations you should have an INCLUDE. But you can just as well create one json for each, like ring.json, sword.json, etc.
For example, you could also create 20 different combinations, and then generate 1000 items out of those randomly with
- {l Code}: {l Select All Code}
"name": "INCLUDE", "value": "items/types/combination%d.txt", "min": 1, "max": "20"
This works too.
As I've said, you have complete freedom how you create those jsons and what fields you define in them, flaregen makes no assumptions and does not tie your hands.
If you want
more complex things like fields depending on each other and have calulcated values for example, then I'd recommend to pick a scripting language and use that script as a template. My pick would be php, because in CLI mode it runs out-of-the-box under Windows and Linux too, easy to install, simple to use (no need to install Apache for the CLI php) and has templater capabilities. For example:
- {l Code}: {l Select All Code}
<?php
/* get arguments from command line */
$lvl = $_SERVER['argv'][1]; // first is the level
$off = $_SERVER['argv'][2]; // second is the offense percentage
$phy = $_SERVER[argv][3]; // third is the physical percentage
?>
level=<?=$lvl?>
dmg=ranged,<?=($lvl * 3)?>,<?=($lvl * 3 + 4)?>
requires_stat=offense,<?=$off?>
requires_stat=physical,<?=$phy?>
As you see, here "dmg" has calculated values which depend on the level for example. Random goes like this:
- {l Code}: {l Select All Code}
price=<?=rand(100, 500)?>
You could also add conditional blocks.
- {l Code}: {l Select All Code}
<? if($off >= 3) { ?>
requires_stat=offense,<?=$off?>
<? } ?>
But php would be just my choice, feel free to use any scripting language, I'm sure all of them can print strings and calculated values. For example python would work as well.
Cheers,
bzt