Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   "Replace thing id" and source (http://forums.wolflair.com/showthread.php?t=10778)

Flappi July 7th, 2010 06:05 AM

"Replace thing id" and source
 
Hello,

I have some issue when implementing some house rules; I use the "replace thing ID" to override the normal thing, and since I want the thing to be use only in a selected game, I add a source as well to hide it in other games.

My problem is the order for accomplishing "replace" and "source": the program replace the thing first, then check if the thing is available by sources. Which means, if I don't use the source, the thing simply doesn't exist.

For instance, let's say in Alice's game, weapon finesse add the Dex to damage. I copy the feat, change it, use "replace thing ID" to override the standard feat, and add the source "Alice's game". But I also play in Bob's game, who don't use that rule. The problem is, when I create a character for Bob's game, the feat cease to exist: the normal feat is overridden by the new feat, and the new feat isn't available since the source "Alice's game" isn't selected.


I see a way to do what I want to do, it's to keep the normal feat, and add conditions in all eval script, bootstrap, etc; something like this for eval scripts:
Code:

if (hero.tagis[source.toto]<>0) then
  ~house rule here
else
  ~official rule here
endif

Is there another way to override a thing if and only if a source is selected ?

rob July 8th, 2010 01:45 PM

As you discovered, the "Replace Thing Id" is *always* applied. It's purpose is for when you want to completely replace a built-in thing with your own customized behaviors. You can't do it conditionally.

In order to have the behavior be conditional on a source, you'll need to define two things. First, you need to define the new feat that will be used in Alice's game, and then make it dependent on the source tag, just like you've already done. But do *not* have this new feat replace the standard one.

The second step is to create a copy of the standard feat for Bob's game. This one should be designated to replace the standard feat using the "Replace Thing Id". The only change you need to make to this thing is to have it be conditional on the source *not* being selected. Every source defines a global tag that you can test against, and the standard "Sources" mechanism provides a simplified way of checking for the selection of a source, but you need to check that a source is *not* present, so you can't use the simplified mechanism. This is achieved by adding a ContainerReq to the new thing via the button on the right within the Editor. For the ContainerReq, select the phase "Testing Global Tags". For the tag expression, enter "!source.MySource", where "MySource" is the id of the new source you've defined for Alice's game. Then save the thing.

At this point, you have two distinct things. One of them is only used when the source for Alice's game is enabled and the other is used whenever the source is *not* selected.

Another simple way to handle things like this is to clone the complete set of data files for the game system. You can go to the Tools menu and select the "Duplicate Game System" option. This will create a copy of the data files that you can customize independently of the standard data files. If Alice's game has lots of customizations, you can copy the Pathfinder files as "Alice's Game". Then you can add the customized things specific to her game only to that set of data files. When you create a character for Alice's game, use that set of data files. Otherwise, use the standard set of data files.

Hope this helps....

Flappi July 9th, 2010 04:43 AM

Doesn't the first solution have some problems with bootstraps ?

Let's keep the above example: Weapon Finesse is modified in Alice's game but not in Bob's game. I duplicate the feat, use the "replace thing id" and use the condition "!source.Alice" in the ContainerReq; and I create a new feat with the source "Alice".

Now, in Alice's game, I create a wizard, with a familiar. The familiar automatically has the feat "Weapon Finesse", and in the file structure, it is translated by a bootstraps: the familiar race has a bootstraps with Weapon Finesse. With the "replace thing id", the bootstrap is now the feat with the CotainerReq's condition "!source.Alice" (and that's why "replace thing ID" is very convenient: you don't have to care about any other things, any script/bootstrap/anything will point to the replacing thing), and then, the bootstrap is simply ignored. Am I wrong ?



For now I use the second solution; and if Bob use some of the Alice's house rules, I copy the things accordingly in the .user file. But it can be tedious if the house rule has many interdependencies, like a class variant, with new custom class abilities and variant of class ability: that's why I think it would be very convenient to add an option for "conditional id replace".

risner July 9th, 2010 05:07 AM

Quote:

Originally Posted by Flappi (Post 41010)
I think it would be very convenient to add an option for "conditional id replace".

I just used this extensively, and I didn't realize it has this issue.

It apparently doesn't work like I thought. The conditional id replacement is sort of what I expected (such as conditional replacement depending on whether or not that source is attached.)

rob July 9th, 2010 05:14 PM

Hmmm. Good catch. I wasn't thinking of a scenario like that. It seems you'll actually need *three* things then.

First, create two things as duplicates of the standard Weapon Finesse feat. Neither of them should use the "Replace Thing Id" option. One should be the standard feat, with a dependency on the Alice source not being defined, while other is the modified version that is dependent on the Alice source.

Now for the third thing. This new thing uses the "Replace Thing Id" mechanism and replaces the standard Weapon Finesse feat. However, this feat should do absolutely nothing. All the behaviors should be eliminated from the feat. The only thing it should do is bootstrap the two things defined above. This way, the replacement feat is always added, regardless of whether the source is enabled or not, and it will always add one of the two things, depending on the source.

The only thing you need to do now is to make sure the first two things are hidden from display, else you'll have two entries listed all the time. I can't remember the proper tag for this in Pathfinder. If you don't know it either, Mathias ought to be able to point it out.

rob July 9th, 2010 05:22 PM

Quote:

Originally Posted by Flappi (Post 41010)
that's why I think it would be very convenient to add an option for "conditional id replace".

I'll add this to the todo list. However, the replacement logic is done at a much lower level than the source handling. As such, some very fundamental code will need to be overhauled to add the capability, so adding conditional id replacement will entail a great deal of work.

Flappi July 10th, 2010 05:48 AM

Quote:

Originally Posted by rob (Post 41030)
The only thing you need to do now is to make sure the first two things are hidden from display, else you'll have two entries listed all the time.

It seems to be easy for special abilities, and maybe for feats (I didn't test for feats). I can't find the same for more complex things like competences.

Mathias July 10th, 2010 06:47 PM

Competences? I'm afraid I don't recognize that term (as used in Pathfinder).

Flappi July 11th, 2010 02:31 AM

Oups, I mean skills. (I'm French and sometimes, I forgot to "un-translate" a term x) ).

Thazar July 13th, 2010 12:39 PM

Thanks for pointing out that you can duplicate the game system. I played with it a bit and it is pretty good and how I want to go. But I do have a question.

What I would like is to have two copies of Pathfinder... something like Pathfinder and Pathfinder_Houserules. I did this and now when I load the game up I get to pick from either game (along with all the other systems) and then it loads great. The main reason I am separating them is due to Pathfinder Society/Convention character generation.

My plan is to have the Pathfinder Core only contain info provided by HeroLab via direct patch. This would be helpful for Pathfinder Society and Conventions. The house ruled version would be greatly changed and I would share the user file with my gaming group for what we have all agreed to. As I use the Replace Thing and Hidden Thing features this is pretty much needed.

So how do I go about patching the house rule version of the game? Will it patch the same way Pathfinder does automatically or do I need to take extra steps? (I understand that I may need to make some tweaks after a patch to my user file.)

Thanks for you time.


All times are GMT -8. The time now is 09:01 PM.

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