PoG trick: How to create classes/races that modify stats

Today words of wisdom will not be on how to create classes and races for (url="http://"http://www.ambrosiasw.com/games/pog/")PoG(/url) (which is quite simple, just create a plugin and put a class and/or race in it), but rather on how to modify the base stats of a player that just started a game using your plugin and selected your race/class.

It goes like this:

  • If you played PoG at least once, you know that the player starts in Fantrima, which is location "World_P10" (you could have found this yourself using the default plugin debug event)

  • Open the plugin options dialog. Create yourself a new global named something like "gb_xx_MyClassInit"

  • Create a new event.

  • Add a "Change Globals" to the main sequence. Make it that it puts the current player race/class in a global

  • Add a "End event" to the linked action list

  • Add a "Conditional" to the main action list, which will test: if the race/class of the player is NOT equal to yours OR if the "gb_xx_MyClassInit" is different than 0, you link to the end event action previously created.

  • Add several "Attribute Wizard" to the main action list to modify the stats the way you want for this race/class

  • Add a "Change globals" action that will set the "gb_xx_MyClassInit" variable to anything else than 0, let say "1"

  • Save the event.

  • Go to the plugin load calls dialog (the gear symbol at the far right of the toolbar) or through the project menu "Game plugin->plugin load calls..."

  • Select "World_P10" and your event in the popup menus.

  • Press the + button and close the dialog

I didn't test it myself but it should do the trick.

Now, if you want to make your plugin compatible with Trinity, follow these additional steps:
(I'm not sure if this will work, again, I didn't test it)

  • Create yourself a global variable with the name "gb_pg_PlayerClass"

  • Open the event you created above

  • At the end of your event, add a "Change globals" that set the above variable to something greater than 2 (ideally, set it at something like 15 or 100, just to be sure that there won't be any conflict in future version of Trinity - if any)

  • Save the event.

  • Re-open the plugin options panel and delete the "gb_pg_PlayerClass" global (this may sound strange but this is a cool hack that should do the trick)

Let me know if that helped you.

------------------
Dee Brown
Beenox inc. - (url="http://"http://www.beenox.com")www.beenox.com(/url) (check our new web site!)
(url="http://"http://www.AmbrosiaSW.com/games/coldstone/")Coldstone Game Engine(/url) / (url="http://"http://www.AmbrosiaSW.com/games/pog/")Pillars of Garendall(/url) developers

(This message has been edited by Dee (edited 02-08-2002).)

Quote

Originally posted by Dee:
**
<snip>
(*) Re-open the plugin options panel and delete the "gb_pg_PlayerClass" global (this may sound strange but this is a cool hack that should do the trick)
Let me know if that helped you.

**

Uhm: thus the variable "gb_pg_PlayerClass" is defined inside Trinity, and should not be re-defined. Is it possible to have a list of the variables used in PoG + Trinity, so that one avoids conflicts like this (or maybe uses the above trick at his advantage :))?

Sincerely,

Alois

------------------

Quote

Create yourself a global variable with the name "gb_pg_PlayerClass"

Giving out the global variables of Trinity so we can modify them? Excellent.

Any chance that we can get the global names of some of the ones in POG itself? I'd be
interested in learning the globals of the quest threads and what they called. Thus we
could modify the existing quests(ie, if we knew that the thread to call the symbol of Garendall quest was using the global gb_pg_KnightQuests variable, and calling the quest
set it to 6, and its completion set it to 7, then we could do some modification of that
quest.. ie, we could make a guy who really wants the authentic standard, and will buy
it from you for X gold and give you a replica to give to septembris. When you arrive
... oh crud, that wouldn't work, would it, because we'd still need access to the NPC's
actual events to modify dialog strings... unless of course when you return with the
symbol it checks a global state and not an item check... heh).

Anyhow, publishing a global list would be real nice. As noted above I'm not sure how
much would benefit us EXCEPT that it would ensure we didn't name our localized plugin
globals the same as POG or trinity globals, and thus prevent conflicts.

------------------
Surprise! You are the lucky winner of random I.R.S. Audit! Just type
in your name and social security number. Please remember that leaving
the room is punishable under law:
Name_______________________ SSN# --___

Quote

if the race/class of the player is NOT equal to yours

And how do you implement this condition?

------------------
The only sovereign you can allow to rule you is reason ŃWizard's Sixth Rule, Faith of the Fallen.
ŃCafall

Quote

Originally posted by Cafall:
**And how do you implement this condition?
**

Put the class in a global using a "Change global" and the "&&Race;" tag. Then, using a condition, check if the value of your global is equal to your race (let say "Elf").

------------------
Dee Brown
Beenox inc. - (url="http://"http://www.beenox.com")www.beenox.com(/url) (check our new web site!)
(url="http://"http://www.AmbrosiaSW.com/games/coldstone/")Coldstone Game Engine(/url) / (url="http://"http://www.AmbrosiaSW.com/games/pog/")Pillars of Garendall(/url) developers

Sorry about the double post.

(This message has been edited by Cafall (edited 02-09-2002).)

Thanks, Dee. With the help of Minister, I was able to make a new class this morning. You were just a tad late. 😛

I found something in your instructions which did not work:
if the "gb_xx_MyClassInit" is different than 0...
This doesn't work because a new global starts out completely blank; it has no value, not even 0, and the event is passed by, so the stats don't change. To get around this obstacle, make an event which sets every race/class initialization global to 1(and put it in the plugin load calls, before the stat changing event ), then on this step:
if the "gb_xx_MyClassInit" is different than 0...
change the condition to: if the "gb_xx_MyClassInit" is different than 1. And in this step:
Add a "Change globals" action that will set the "gb_xx_MyClassInit" variable to anything else than 0, let's say "1"
set the"gb_xx_MyClassInit" variable to 2.

------------------
The only sovereign you can allow to rule you is reason ŃWizard's Sixth Rule, Faith of the Fallen.
ŃCafall

Quote

Originally posted by Cafall:
**I found something in your instructions which did not work:
if the "gb_xx_MyClassInit" is different than 0...
This doesn't work because a new global starts out completely blank; it has no value, not even 0, and the event is passed by, so the stats don't change. To get around this obstacle, make an event which sets every race/class initialization global to 1(and put it in the plugin load calls, before the stat changing event ), then on this step:
if the "gb_xx_MyClassInit" is different than 0...
change the condition to: if the "gb_xx_MyClassInit" is different than 1. And in this step:
Add a "Change globals" action that will set the "gb_xx_MyClassInit" variable to anything else than 0, let's say "1"
set the"gb_xx_MyClassInit" variable to 2.
**

Out of curiousity, if you then follow Dee's second set of instructions to keep your plug-in from conflicting with Trinity, does your work around also then not conflict with Trinity?

------------------
CRH

Quote

Out of curiousity, if you then follow Dee's second set of instructions to keep your plug-in from conflicting with Trinity, does your work around also then not conflict with Trinity?

No, Dee's Trinity workaround and my version of the instructions work perfectly together.
By the way, if you're creating races, and not classes, You don't need to implement Dee's Trinity workaround.

------------------
The only sovereign you can allow to rule you is reason ŃWizard's Sixth Rule, Faith of the Fallen.
ŃCafall