Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Cortex System

Notices

Reply
 
Thread Tools Display Modes
fierop
Junior Member
 
Join Date: Feb 2010
Posts: 24

Old February 15th, 2010, 11:54 AM
This is a cross-post of a thread I have going in the HL - Authoring Kit Forum and it was suggested I put it here for other's benefit as well.

Here is my circumstance. I am adding some custom equipment based on some information I tracked down out on the Internet. The pieces of equipment in question are Cybernetic Augmentations. I have added all these Augmentations as pieces of equipment.

I want to add an Augmentation which requires two other pieces of equipment before being allowed. Upon satisfying the pre-requisites then the user would gain a trait at a specific die value.

So, I want to add Tactical Analysis System which imbues the user with the Danger Sense trait at d4. But in order to get the augmentation the player character must already have "Mindset Rank 1" and "Cybernetic Eye(s)".

Can anyone help me with this script? I am still trying to track down documentation on script syntax and if I can get this one I may be able to figure out how to do it for some of the other objects I have.

Thanks in advance for your assistance in this matter.

PFiero
fierop is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old February 15th, 2010, 12:37 PM
I'm presuming that "Mindset rank 1" and Mindset rank 2" are different pieces of equipment.

What happens if this augmentation is taken without the presence of the other two augmentations? Is that allowed, but you don't get Danger Sense, or should there be a warning if that happens?

Well, Cybernetic eye is easy to test for. In the editor, go to the Pick-reqs button. Add a new pick-req, and select cybernetic eye from that list.

Presuming that mindset rank 1 has a unique ID of "eqCyMinds1" (equipment - cyberware - mindset - 1), here's a pre-req script to test for mindset rank 1 or 2 or 3:

Code:
 
if (hero.childlives[eqCyMinds1] + hero.childlives[eqCyMinds2] + hero.childlives[eqCyMinds3] <> 0) then
@valid = 1
endif
If any of those items have been added to the hero, then hero.childlives[the item's ID] will equal 1. If it's not present, it equals 0. So, adding all those together, and seeing if the sum is not 0 will tell you whether you have one or more mindset things on the character. Replace the unique IDs in my sample script with whatever IDs you gave your mindset items.

If you're allowed to purchase the various pieces of equipment, independant of each other, but you only get the asset if all three are present, that's a bit more complex - say so if that's the case and I'll guide you through that.
Mathias is offline   #2 Reply With Quote
fierop
Junior Member
 
Join Date: Feb 2010
Posts: 24

Old February 15th, 2010, 01:06 PM
Ok, I get an error referring to an undeclared variable.
fierop is offline   #3 Reply With Quote
fierop
Junior Member
 
Join Date: Feb 2010
Posts: 24

Old February 15th, 2010, 01:18 PM
Here are some screen caps

the error


and the two scripts I've got in the pre-req section.


and

fierop is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old February 15th, 2010, 01:52 PM
You defined the Mindset and Cybereye pieces of equipment and tested them before creating this thing, right? You've verified that those Ids are correct?

The fact that it gave an error on the full cyber-eyes, and not the cyber-eye, is suspicious - it should have stopped compiling and reported an error with the first thing that was wrong, if there was something wrong with the script in general.
Mathias is offline   #5 Reply With Quote
fierop
Junior Member
 
Join Date: Feb 2010
Posts: 24

Old February 15th, 2010, 02:15 PM
Okay, well apparently I'm a dork.

I forgot I had been piddling with another Item and Pre-Requisites. I also discovered that the Full Cybernetic Eyes error was a victim of me being said dork and typo'ing the id.

Now off to do the bootstrap to make acquiring the equipment give me the Danger Sense trait.
fierop is offline   #6 Reply With Quote
fierop
Junior Member
 
Join Date: Feb 2010
Posts: 24

Old February 15th, 2010, 02:43 PM
Alright....Looks like I have things working.

Mathias thank you for the assistance.

I am planning on working on a whole slew of objects for the Cortex system an I'm certain I will have some more questions.
fierop is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old February 15th, 2010, 02:55 PM
The Beastman Asset grants Danger Sense, so I'd suggest opening a copy of Beastman within the assets tab of the editor. There, you'll see that the "Bootstraps" button on the top right is highlighted, and says that there are 8 bootstraps. Press that button, and you can see how Danger Sense is added. Now for the complex part - making this copy of Danger Sense cost 0 trait points.

Press the "Tags" button associated with Danger Sense, and you'll see that two tags are added: "Die.0" and "FreeDie.2". Die.0 means add the option for that asset to go to d0. What that means: let's say you wanted to play a Bestman who was unusually unaware compared to his kin. So, you might purchase the Bestman package, and then switch the level of Danger Sense to d0 - that will recover the trait point cost for Danger Sense and grey out Danger Sense. Since your cybernetics aren't going to include the option to buy off the assets they grant, you don't need to include the Die.0 tag.

The FreeDie.2 tag means to reduce the cost of the trait by 2 (remember from reading the editor manual - Traits in Cortex are stored as half the value, so FreeDie.2 means that the d4 level of Danger Sense is free).

For future reference, also take a look at the Fields button for Enhanced Senses or Inherent Weapons - that's how to pre-fill the text box for a free trait.

Don't forget to delete the copy of Beastman you just added, or you'll encounter errors next time you try to compile the files.
Mathias is offline   #8 Reply With Quote
fierop
Junior Member
 
Join Date: Feb 2010
Posts: 24

Old February 15th, 2010, 08:21 PM
OK, yet another question.

How can I do pre-reqs for increasing reqs within the same trait.

For example:
I have a trait called Data Storage & Access.
@ d2-d4 it requires Mindset Rank 1
@d6-d10 it requires Mindset Rank 2
@ d12 it requires Mindset Rank 3

Is it just a matter of multiple if statements? If so how do you check the die level AND the trait name?
fierop is offline   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old February 15th, 2010, 11:24 PM
It is a matter of multiple if statements.

As a prereq, write a requirement for any one of the mindset ranks - just like you did for your other piece of cyberware. When you're still in the list, selecting the trait, you don't know what the trait's level will be, so you can't test that yet.

Once that's done, add an eval rule, as well. Eval rules have all of the functions of an eval script, but they also have the validation requirements that prereqs have. Timing: Validation / 5000 - Put Eval rules at that time unless you have a specific reason not to.

Code:
 
~first, if we're a d12 trait
if (field[trtFinal].value >= 6) then
  ~that requires mindset 3
  validif (hero.childlives[cybMndSet3] <> 0)
 
~if not that, check if we have a d6 - d10 trait
elseif (field[trtFinal].value >= 3) then
  ~that requires mindset 2 or 3
  validif (rank 2 or rank 3)
 
~if we have a lower trait value than that
else
  ~we need any level of the mindset
  validif (rank 1 or rank 2 or rank 3)
  endif
Note that I didn't write out the full code for the tests - don't forget to finish that up when you copy this to your trait.

BTW, validif ( ) is the same as:

if ( ) then
@valid = 1
done
endif

Saves a bit of typing when writing prereqs.
Mathias is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 11:25 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.