PDA

View Full Version : Cyberpunk 2020 Ruleset... some help required



Starfleet
November 27th, 2007, 14:10
I've started work on a cyberpunk 2020 ruleset for me and my gaming group and ran into a few problems.. So far modifying the actual Graphics is easy I know how to do that backwards.. but I've been trying to work on the character sheet and I've ran into a few small problems that I just can't seem to work out.

I've so far managed to get all the attributes in ie:



<abilityscore name="int" source="abilities.int.score">
<anchored>
<to>abilityframe</to>
<position>insidetopleft</position>
<offset>100,23</offset>
</anchored>
<tabtarget>
<next>ref</next>
<prev>weight</prev>
</tabtarget>
</abilityscore>
<abilityscore name="ref" source="abilities.ref.score">
<anchored>
<to>int</to>
</anchored>
<tabtarget>
<next>ref1</next>
<prev>int</prev>
</tabtarget>
</abilityscore>
<abilityscore name="ref1" source="abilities.ref1.score">
<anchored>
<to>abilityframe</to>
<position>insidetopleft</position>
<offset>135,50</offset>
</anchored>
<tabtarget>
<next>tech</next>
<prev>ref</prev>
</tabtarget>
</abilityscore>
<abilityscore name="tech" source="abilities.tech.score">
<anchored>
<to>ref</to>
</anchored>
<tabtarget>
<next>cool</next>
<prev>ref1</prev>
</tabtarget>
</abilityscore>
<abilityscore name="cool" source="abilities.intelligence.score">
<anchored>
<to>tech</to>
</anchored>
<tabtarget>
<next>attr</next>
<prev>tech</prev>
</tabtarget>
</abilityscore>
<abilityscore name="attr" source="abilities.attr.score">
<anchored>
<to>cool</to>
</anchored>
<tabtarget>
<next>luck</next>
<prev>cool</prev>
</tabtarget>
</abilityscore>
<abilityscore name="luck" source="abilities.luck.score">
<anchored>
<to>attr</to>
</anchored>
<tabtarget>
<next>ma</next>
<prev>attr</prev>
</tabtarget>
</abilityscore>
<abilityscore name="ma" source="abilities.ma.score">
<anchored>
<to>luck</to>
</anchored>
<tabtarget>
<next>body</next>
<prev>luck</prev>
</tabtarget>
</abilityscore>
<abilityscore name="body" source="abilities.body.score">
<anchored>
<to>ma</to>
</anchored>
<tabtarget>
<next>emp</next>
<prev>body</prev>
</tabtarget>
</abilityscore>
<abilityscore name="emp" source="abilities.emp.score">
<anchored>
<to>body</to>
</anchored>
<tabtarget>
<next>emp1</next>
<prev>body</prev>
</tabtarget>
</abilityscore>
<abilityscore name="emp1" source="abilities.emp1.score">
<anchored>
<to>abilityframe</to>
<position>insidetopleft</position>
<offset>135,238</offset>
</anchored>
<tabtarget>
<next>run</next>
<prev>emp</prev>
</tabtarget>
</abilityscore>
<abilityscore name="run" source="abilities.run.score">
<anchored>
<to>emp</to>
</anchored>
<tabtarget>
<next>leap</next>
<prev>emp1</prev>
</tabtarget>
</abilityscore>
<abilityscore name="leap" source="abilities.leap.score">
<anchored>
<to>run</to>
</anchored>
<tabtarget>
<next>lift</next>
<prev>run</prev>
</tabtarget>
</abilityscore>
<abilityscore name="lift" source="abilities.lift.score">
<anchored>
<to>leap</to>
</anchored>
<tabtarget>
<next>waiting</next>
<prev>leap</prev>
</tabtarget>
</abilityscore>
<abilitylabel>
<anchored>
<to>int</to>
</anchored>
<static>INT</static>
</abilitylabel>
<abilitylabel>
<anchored>
<to>ref</to>
</anchored>
<static>REF</static>
</abilitylabel>
<abilitylabel>
<anchored>
<to>tech</to>

</anchored>
<static>TECH</static>
</abilitylabel>
<abilitylabel>
<anchored>
<to>cool</to>

</anchored>
<static>COOL</static>
</abilitylabel>
<abilitylabel>
<anchored>
<to>attr</to>

</anchored>
<static>ATTR</static>
</abilitylabel>
<abilitylabel>
<anchored>
<to>luck</to>

</anchored>
<static>LUCK</static>
</abilitylabel>
<abilitylabel>
<anchored>
<to>ma</to>

</anchored>
<static>MA</static>
</abilitylabel>
<abilitylabel>
<anchored>
<to>body</to>

</anchored>
<static>BODY</static>
</abilitylabel>
<abilitylabel>
<anchored>
<to>emp</to>

</anchored>
<static>EMP</static>
</abilitylabel>
<abilitylabel>
<anchored>
<to>run</to>

</anchored>
<static>RUN</static>
</abilitylabel>
<abilitylabel>
<anchored>
<to>leap</to>

</anchored>
<static>Leap</static>
</abilitylabel>
<abilitylabel>
<anchored>
<to>lift</to>

</anchored>
<static>Lift</static>
</abilitylabel>


and the associated DB updating for them in the lua file.. however i'm stumped when i got to adding in a field that did NOT exist in the d20 ruleset (i'm using it as a basis to modify from).. what I want to do is add a new frame (that part works) called Armor so i did this:



<!-- Armor -->
<genericcontrol name="armorframe">
<bounds>210,90,350,200</bounds>
<frame>
<name>sheetgroup</name>
</frame>
</genericcontrol>


that part creates the frame all nicely for me (ok it's not perfect atm but hey it'll do until i get this next part working) within that section I want to add the armor entry box's so i thought all i'd have to do is something like this



<armorfield name="head" source="armor.head">
<anchored>
<to>armorframe</to>
<position>insidetopleft</position>
<offset>10,23</offset>
</anchored>
<tabtarget>
<next>ref</next>
<prev>weight</prev>
</tabtarget>
</armorfield>


however no box appears what am I doing wrong or what am I missing?

any help be greatful

-Rob

Starfleet
November 27th, 2007, 14:16
ok i might have found my issue (should have read more on templates) if i understand right I need to make a template for the new armor section?

Valarian
November 27th, 2007, 14:34
The template should be it, I think. Let me know how this goes. Cyberpunk 2020 is one of the minor set of rules on my list of things to do. I'd love a copy of the character sheet (not rules modules) when you get it finished.

Starfleet
November 27th, 2007, 14:47
yeah it was a template issue once i worked that out it went rather fast... the actual ruleset as far as i know can be shared (i'll ask Rtalsorian anyway) i'm not planning on doing rules modules for it simply because we use the books so eh.. and if making a character sheet is illegal then a lot of people will be getting into a load of trouble.

the big ones gonna be doing the skills mainly because as you know skills in CP2020 are plenty and there not exactly like d20 ones..

I'll post up some SS's later on atm i'm heading off to sleep in a bit and my prtscrn isn't working for some reason :/

Valarian
November 27th, 2007, 15:31
I'd perhaps just put the special abilities in to the skills and leave the rest for the player to enter on to the sheet. I think even if you dedicate the entire tab to the skills list, there's too many to fit comfortably on one page. I'd enter them all in the Lua script though, to tie them to the skills and so you can use them on NPC sheets.

Starfleet
November 28th, 2007, 01:56
screen of how far i've gotten with the desktop stuff

Starfleet
November 28th, 2007, 03:45
Ok this lua code is driving me nuts

i'm trying to do the BTM field so that it automatically places the value that is required into the box for it, which basically means if the body field is within certain values that the btm field needs to be a set number.

Now the code i've been trying to use is this



function onSourceUpdate()
print "updated";
print "entering if statement";
if (sources[bodyfield[1]].getValue() < 3) then
setValue(0);
end
else if (sources[bodyfield[1].getValue() < 2 and sources[bodyfield[1].getvalue() >5) then
setValue(-1);
end
else if (sources[bodyfield[1].getValue() < 4 and sources[bodyfield[1].getValue() >8) then
setValue(-2);
end
else if (sources[bodyfield[1].getValue() <7 and sources[bodyfield[1].getValue() >10) then
setValue(-3);
end
else if (sources[bodyfield[1].getValue() == 10) then
setValue(-4);
end
else
setValue(-5);
end
print "exit if statement";
end

function onInit()
addSource(bodyfield[1]);
print "initalising";
super.onInit();

end



now i know it's getting the right field because i tested it on a simple update value etc to see if it changed when i changed the body field. However with that lovely code up there i keep getting the error:



script error: [string "charsheet_main:btm"]:1: ')'expected near '<eof>'


so if any one has any idea's what i'm doing wrong i'd appreciate it.

-Rob

Griogre
November 28th, 2007, 07:23
I'm not an expert in lua but your if logic seems flawed. None of the else ifs will ever trigger because it is not possible to have a single number both less than 2 and greater than 5, for example.

You might have better success with something like:


function onSourceUpdate()
print "updated";
print "entering if statement";
if (sources[bodyfield[1]].getValue() < 3) then
setValue(0);
end
else if (sources[bodyfield[1].getValue() < 5) then
setValue(-1);
end
else if (sources[bodyfield[1].getValue() < 8) then
setValue(-2);
end
else if (sources[bodyfield[1].getValue() < 10) then
setValue(-3);
end
else if (sources[bodyfield[1].getValue() == 10) then
setValue(-4);
end
else
setValue(-5);
end
print "exit if statement";
end

function onInit()
addSource(bodyfield[1]);
print "initalising";
super.onInit();

end

I don't know what you are really trying to do here but it looks like you wanted the values in between the two numbers not an impossible number inside of both the greater and less than ranges.

Hamish
November 28th, 2007, 07:59
I agree with Griogre, I don't see how any condition can return true except the first and the last. Also, you need to get rid of all the 'end' statements, and replace 'else if' by 'elseif'. The correct syntax is:

if (condition) then
(statements)
elseif (condition) then
(statements)
else
(statements)
end

Starfleet
November 28th, 2007, 08:05
even if i mixxed up the logic it still doesn't want to work even when i do



if (sources[bodyfield[1].getValue() == 1) then
setValue(0);
end


it's throwing an error.. ok now i have it playing nice so far with one and yeah i was half asleep when i was coding earlier the < > are backwards ;)

removed the ( ) and it worked apparently lua isn't like c and the such in needing them

so

if sources[bodyfield[1].getvalue() etc

Starfleet
November 28th, 2007, 08:24
ok that hurdle over onto doing the skills, combat and lifepath section

Thanks for the help btw

VgnFrnd
December 7th, 2007, 02:27
The crowd is starting to cheer in appreciation.... :) I really like CP2020. It would be great to see whatever you can legally share when you are done!

Miriya
May 12th, 2008, 00:43
Hey man I came to check in for a CP 2020 mod and I'm happy to see you at work for it. I wish I could help but hey least I can do is offer suppot so gl.