PDA

View Full Version : Zipped home made ruleset in .pak format issue



bzjeurd
March 25th, 2014, 13:59
Hello all,

I recently publish a new home made ruleset (Pavillon Noir) based on CoreRPG and installed as a .pak file, but in this format, I got several issues about unloaded LUA scripts:

Script Error: [string "actionsdep"]:1: attempt to call field 'onInit' (a nil value)
Script Error: [string "escniveau"]:1: attempt to call field 'updateDisplay' (a nil value)
Ruleset Warning: Could not load script file (Ruleset: Pavillon Noir Reloaded) (/common/scripts/checkboxgroup.lua)
Ruleset Warning: Could not load script file (/common/scripts/checkboxgroup.lua)
Ruleset Warning: Could not load script file (Ruleset: Pavillon Noir Reloaded) (/common/scripts/checkboxgroup.lua)
Ruleset Warning: Could not load script file (/common/scripts/checkboxgroup.lua)
Ruleset Warning: Could not load script file (Ruleset: Pavillon Noir Reloaded) (/common/scripts/checkboxgroup.lua)
Ruleset Warning: Could not load script file (/common/scripts/checkboxgroup.lua)
Script Error: [string "gloiredep"]:1: attempt to call field 'onInit' (a nil value)
Script Error: [string "infamiedep"]:1: attempt to call field 'onInit' (a nil value)

I used the FG special tool to manage pak/ext/mod files and a zip manager as 7zip with the same result.

If I unzip the .pak file in the ruleset folder, all these issues disapear.

JPG or someone could help me to find what I did wrong with my .pak ruleset?

Bzjeurd (aka Pibrac).

Zeus
March 25th, 2014, 14:44
Sounds like you may have accidentley created the .pak file with a subfolder as the root of the archive, the ruleset files need to be in the root of the archive. The easiest way to do this is to open up a Windows Explorer window, unzip your current .pak file. It will probably unpack to a new subfolder. Open the subfolder, select all the ruleset files including base.xml, right click the selection and ZIP the files into a .pak named file.

That should create a new archive with base.xml and other ruleset files at the root of the archive.

bzjeurd
March 25th, 2014, 22:11
Hi Zeus,
I've checked that and all the files are correctly located in the "nameruleset" folder, and not in a "nameruleset" subfolder.
In your case, the campaign cannot start at all and the error is like "no base.xml found".
It's seems to be a little more tricky...
Bz

Zeus
March 25th, 2014, 22:29
Can you post up the base.xml file.

Blacky
March 26th, 2014, 03:43
It's weird, because I did it for the release 1 with no issues (I could create a new campaign, or load an existing campaign if I deleted or renamed the Pavillon Noir Reloaded folder for the unpak version). With 7zip (better compression), zip container, deflate compression (the only thing FG handle), fastest compression (to help with loading speed), default dictionary and word size.

The root ruleset files at the root of the zip. It's \base.xml for example, not \Pavillon Noir Reloaded\base.xml

I just tested both old and new campaign again with the pak release 1, no issues.

The only other thing I can think of right now is perhaps be careful about shared file when you zip (Windows may lock a file opened elsewhere and it may not be zipped with the others).

bzjeurd
March 26th, 2014, 13:08
You will find the base.xml in attachment.

I've tested the .pak file in two different computer with the same issue: some lua scripts related to template are not loaded or could no be found.
This is a warning in the debug console (/console) and only a few controls based on specific template are impacted.

And all works fine if the .pak is deflated in a folder.

Very very strange.

Bz

bzjeurd
March 26th, 2014, 14:24
Hello all,

I solved the loading script issue...
Some of my templates load dedicated script using this wrong formated path in the xml tag:

<script file="/common/scripts/button_escrimesimple.lua" />

Removing the first / solve the issue with the .pak format of the ruleset.

Thanks for your help.

Bz.

Griogre
March 26th, 2014, 18:58
It's always those tiny typos that are a pain to find. :p