PDA

View Full Version : Trying To Fix A Rulset Bug With Portraits



Jay_NOLA
April 23rd, 2017, 21:18
I'm trying to find out what is causing a bug with portrait selection in the Advanced Fighting Fighting Fantasy 2nd Edition 1.1 rule set.

The rule set doesn't show all the available portraits unlike any other rule sets. I'm only seeing few of the generic FG ones show up. This isn't happening with other older and newer rulesets.

It is an older rule set but it does work.

Thanks

Trenloe
April 23rd, 2017, 23:05
The code in the AFF2E ruleset only looks at the files in the root \tokens directory. There is no code to build up the folders that CoreRPG uses.

The AFF2E ruleset has some basic code in classes\utilities\portraits.xml in the windowclass portraitselection:


<script>
function onInit()
getWindows()[1].close();

for k, v in ipairs(User.getPortraitFileList()) do
local newentry = createWindow();
newentry.portrait.setFile(v);
end
end
</script>

The CoreRPG code in utility\scripts\portraitselection.lua (and the associated windowclass enties and graphics) would have to be migrated over to the AFF2E ruleset.