Aller au contenu

Photo

Attempting to Create a Stone of Recall - and another question.


  • Veuillez vous connecter pour répondre
18 réponses à ce sujet

#1
Sabranic

Sabranic
  • Members
  • 306 messages

Background:
Hello!  I have been working for the past two years on a revamp of the Tomb of Horrors, adapting it for a truly epic campaign (25+), as well as integrating it into a pseudo-conclusion of the KC saga.  I have a background in front-end web development and graphics design, and I have been reading guides, taking apart things others have built, and generally muddling my way through the tool set for some time.  I am not a code god by any means, but I can generally look at something which works and take what I need from it.  I do have a background in play-testing, and provided some very detailed bug reports to the makers of BG: Reloaded.

 

Problem:

My current "issue" is an inability to create a charged magical item that will transport the party to a Mordenkainen's Magnificent Mansion a set number of times.  I have dissected the Ice Wind Dale campaign, and attempted to adapt their teleportation stone to my uses, but everything I do fails.  (As I mentioned, what I lack in coding skills I tend to make up for by futzing around with something smarter people made, and beating it with a fence post until it does what I need it to). 

 

Is there any resources that I might peruse to get a better concept of what I am doing wrong? My searching has turned up lots of dead links to a VN site that was taken down a few years back, and it's replacement seems to be missing much of that content.  

 

In specific, I am uncertain how I make the "unique power self only" items property call a conversation.  (Once I get a handle on this, many of my persistent issues, such as getting lilacore to speak and the dream weapon updates should fall into place.)

 

Additional Question:

Also, is there a place I would be allowed to post the alpha of my campaign for people to review, play or borrow components of they may want for their own use?  I have it in a drop-box currently, but I am unfamiliar with the rules regarding posted links, so until told otherwise, I will keep a lid on the location.

 

Thanks.



#2
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Ok, there's a few things you have to do to implement such an item.

The first thing is a script that awards the proper item somewhere from a conversation (usually the best):

void main()
{
	object oPC = GetPCSpeaker();
	object oITEM = CreateItemOnObject("orglash_crystal", oPC, 1, "recall_stone", 0);
	FloatingTextStringOnCreature("You have received a Stone of Recall.", oPC, FALSE);
	SetFirstName(oITEM, "Stone of Recall");
	SetDescription(oITEM, "This stone will transport the party to a Mordenkainen's Magnificent Mansion.");
	SetItemCharges(oITEM, 5);
	SetItemCursedFlag(oITEM, TRUE);
	itemproperty iPROP = GetFirstItemProperty(oITEM);
	while (GetIsItemPropertyValid(iPROP)==TRUE)
	{
		RemoveItemProperty(oITEM, iPROP);
		iPROP = GetNextItemProperty(oITEM);
	}
	iPROP = ItemPropertyCastSpell(IP_CONST_CASTSPELL_UNIQUE_POWER_SELF_ONLY, IP_CONST_CASTSPELL_NUMUSES_1_CHARGE_PER_USE);
	DelayCommand(0.0f, AddItemProperty(DURATION_TYPE_PERMANENT, iPROP, oITEM));
}

This will create the item in your inventory (I also made it cursed so it's not droppable or transferable, but you can decide what to do with it). Of course like this it will do nothing. What you have to do now is modify whatever script the module is using on the module properties slot of "On Activate Item Script". By default this "x2_mod_def_act", so this is probably what you will have to modify if you didn't touch that slot in your module properties, but to be sure, you should check it out.

Anyways. modify it by adding the following code right after the "object oItem = GetItemActivated();" line:

     object oPC = GetItemActivator();
     string oTAG = GetTag(oItem);
     if (oTAG == "recall_stone")
     {
         AddScriptParameterObject(oItem);
         ExecuteScriptEnhanced("script_teleport_stone", oPC);
         return;
     }

And then there's the script that will be called when the item is used, I called this "script_teleport_stone" (the name is important as noted above).

void main(object oSTONE)
{
    object oPC = OBJECT_SELF;
    if (GetIsInCombat(oPC)==TRUE)
    {
        FloatingTextStringOnCreature("You cannot use the Stone of Recall while you are in combat.", oPC, FALSE);
        int nCHARGE = GetItemCharges(oSTONE);
        SetItemCharges(oSTONE, nCHARGE + 1);
        return;
    }
    object oWAY = GetObjectByTag("teleport_waypoint");
    location lWAY = GetLocation(oWAY);
    object oTARGET = GetFirstFactionMember(oPC);
    while (oTARGET != OBJECT_INVALID)
    {
        AssignCommand(oTARGET, JumpToLocation(lWAY));
        oTARGET = GetNextFactionMember(oPC);
    }
}

This script will teleport you to an object with a tag of "teleport_waypoint", of course you have to add somewhere (in the zone where you want to teleport to) a waypoint object with that tag.
Anyways, this should do it, hopefully that helped.

 

P.S. You can post the alpha of your campaign in the "Modules" section of the forum.


  • Sabranic aime ceci

#3
Tchos

Tchos
  • Members
  • 5 030 messages

In specific, I am uncertain how I make the "unique power self only" items property call a conversation.  (Once I get a handle on this, many of my persistent issues, such as getting lilacore to speak and the dream weapon updates should fall into place.)

 

That can be done, though it may be a little complicated at your current level.  I needed to do it to allow an inventory item that you find start a quest only after it gives you a choice whether to start it or not via a conversation.  I'll have to look at my scripts and see which of my methods worked.

 

I also, separately, created a kind of stone of recall.  I don't know the specific properties of one by the name "stone of recall", but my hearthstone is an item you activate, which (rather than simply teleporting the player immediately) starts a casting time progress bar and puts a visual effect on the character using it until the progress bar finishes, at which point there is a teleportation effect and you're teleported to wherever you last attuned the stone (the inn, the tavern, or the temple).  It could also be made so that you can attune it to any arbitrary location.  For that, I invite you to see how it works in my campaign and use the script if you like.


  • Sabranic aime ceci

#4
Sabranic

Sabranic
  • Members
  • 306 messages

Thank you all very much, I will see what I can do with this information.  I greatly appreciate the tips.



#5
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 585 messages

Background:
Hello!  I have been working for the past two years on a revamp of the Tomb of Horrors, adapting it for a truly epic campaign (25+), as well as integrating it into a pseudo-conclusion of the KC saga.  I have a background in front-end web development and graphics design, and I have been reading guides, taking apart things others have built, and generally muddling my way through the tool set for some time.  I am not a code god by any means, but I can generally look at something which works and take what I need from it.  I do have a background in play-testing, and provided some very detailed bug reports to the makers of BG: Reloaded.

 

Problem:

My current "issue" is an inability to create a charged magical item that will transport the party to a Mordenkainen's Magnificent Mansion a set number of times.  I have dissected the Ice Wind Dale campaign, and attempted to adapt their teleportation stone to my uses, but everything I do fails.  (As I mentioned, what I lack in coding skills I tend to make up for by futzing around with something smarter people made, and beating it with a fence post until it does what I need it to). 

 

Is there any resources that I might peruse to get a better concept of what I am doing wrong? My searching has turned up lots of dead links to a VN site that was taken down a few years back, and it's replacement seems to be missing much of that content.  

 

In specific, I am uncertain how I make the "unique power self only" items property call a conversation.  (Once I get a handle on this, many of my persistent issues, such as getting lilacore to speak and the dream weapon updates should fall into place.)

 

Additional Question:

Also, is there a place I would be allowed to post the alpha of my campaign for people to review, play or borrow components of they may want for their own use?  I have it in a drop-box currently, but I am unfamiliar with the rules regarding posted links, so until told otherwise, I will keep a lid on the location.

 

Thanks.

 

A number of years ago I created my Silverwand Sample Campaign which is a small multi module campaign that intentionally includes as many of the common things people would want to do in a campaign as I could think of.  It was done before SoZ and so does not include some of its features but should still be helpful. Basically I felt that my own attempts to dissect the OC had been unproductive because of the complexity, and that a simpler campaign would be easier for people to utilize. You can download it from my blog as well as any of the other community offerings I made over the years, including many items that have special properties.

 

Regards


  • GCoyote aime ceci

#6
ColorsFade

ColorsFade
  • Members
  • 1 267 messages


 

Additional Question:

Also, is there a place I would be allowed to post the alpha of my campaign for people to review, play or borrow components of they may want for their own use?  I have it in a drop-box currently, but I am unfamiliar with the rules regarding posted links, so until told otherwise, I will keep a lid on the location.

 

 

 

 

Dropbox

 

I think that's how most of us share our campaigns/modules for beta testing. 



#7
Tchos

Tchos
  • Members
  • 5 030 messages

A number of years ago I created my Silverwand Sample Campaign which is a small multi module campaign that intentionally includes as many of the common things people would want to do in a campaign as I could think of.

 

I endorse Kaldor's sample campaign, which I found useful to examine before creating my own first campaign for all the reasons he mentions.  There are also many useful scripts in it.

 

After that, examining all of the original campaigns was the next step.  When building my campaign and facing certain tasks, I could recall similar tasks that I saw in the original campaigns, so I could find them there and see how they did them.



#8
Sabranic

Sabranic
  • Members
  • 306 messages

Thank you all so much for the assistance!  This is a wonderful community.



#9
Sabranic

Sabranic
  • Members
  • 306 messages

Been playing with this, I am not seeing the "x2_mod_def_act" script in the module - I am assuming that means i will need to grab it from somewhere else and import it? 



#10
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

It's the default script that NW2 uses for item activation. In the toolset, you should see it by deault in the module properties lockbox (in the "On Activate Item Script" slot) that you can view if you select View->Module Properties in toolset's menu bar.

You can extract it from a zip folder in your installation directory, the exact path is:

 

..../Install Directory/Data/Scripts.zip

 

But this should not be necessary, if you have an open module and you open a default script (it should appear if you select File->Open Conversation/Script in the toolset's menu bar), you can then copy it on a new script you have made on your module and modify it accordingly. Just make sure to rename the new script with the same name or to modiy the On Activate Item Script slot of the module properties.

 

Also make sure you have the latest version of the game (1.23) because it makes a lot of difference, especially for what concerns the toolset.


  • Sabranic aime ceci

#11
Tchos

Tchos
  • Members
  • 5 030 messages

For an individual item, it's often more convenient and less likely to be overridden by something else if you used a tag-based script for it instead of modifying the default module item activation script.  You can do that by writing a script and naming it with the object tag with "i_" in front of it and "_ac" after it.  Anything written in that script will be executed when the item with that tag is activated, with no additional checks required.  (Assuming you're using the default module item activation script and have the module properties set to allow it, which is also default.)



#12
Sabranic

Sabranic
  • Members
  • 306 messages

Thanks again, I will poke around with this new information tonight after work.  When finished I might make the magnificent mansion a stand alone for those that want to import it into existing content. 

 

 

Game version is 1.023 1765 (Final) August 17, 2009 - 17:29:45, purchased from GOG.



#13
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
Back in the day I had a similar script thing I was working on. I called it an " Emperor's Tent" or some such but the idea was similar. If memory serves, the player used a wand item to target the ground. A tent place able would be spawned in that spot. The player could then set a spoken (typed in game chat) password in order to access it, so that way your buddies could come in as well. When they used the tent and spoke the password, it would jump them to inside the tent (new area location). If somebody tried to use the tent place able without the correct password a notification would be sent to the tent owner ("somebody is trying to enter the tent!").

Think I had it all working. Let me know if your labors here are not fruitful and I will see if I can dig up what I had.

#14
Sabranic

Sabranic
  • Members
  • 306 messages

Oh that's a really exceptional idea - it basically creates a "door."  I'm trying to get what's been suggested so far working, but I'd still love to see what you have.

 

Here is the description from the Player's Handbook:

 

Mordenkainen's Magnificent Mansion
(Alteration, Conjuration)
Range: 10 yds.

Components: V, S, M
Duration: 1 hr./level

Casting Time: 7 rds.
Area of Effect: 300 sq. ft./level

Saving Throw: None

 

By means of this spell, the wizard conjures up an extradimensional dwelling, entrance
to which can be gained only at a single point of space on the plane from which the spell
was cast. From the entry point, those creatures observing the area see only a faint
shimmering in the air, in an area 4 feet wide and 8 feet high. The caster of the spell
controls entry to the mansion, and the portal is shut and made invisible behind him when
he enters. He may open it again from his own side at will. Once observers have passed
beyond the entrance, they behold a magnificent foyer and numerous chambers beyond.
The place is furnished and contains sufficient foodstuffs to serve a nine-course banquet to
as many dozens of people as the spellcaster has levels of experience. There is a staff of
near-transparent servants, liveried and obedient, to wait upon all who enter. The
atmosphere is clean, fresh, and warm.

 

Since the place can be entered only through its special portal, outside conditions do not
affect the mansion, nor do conditions inside it pass to the plane beyond. Rest and
relaxation within the place is normal, but the food is not. It seems excellent and quite
filling as long as one is within the place. Once outside, however, its effects disappear
immediately, and if those resting have not eaten real food within a reasonable time span,
ravenous hunger strikes. Failure to eat normal food immediately results in the onset of
fatigue or starvation penalties as decided by the DM.
The material components of this spell are a miniature portal carved from ivory, a small
piece of polished marble, and a tiny silver spoon. These are utterly destroyed when the
spell is cast.

(It is worth mentioning that this spell has been used in conjunction with a normal
portal, as well as with illusion magic. There is evidence that the design and interior of the
space created can be altered to suit the caster's wishes.)



#15
Sabranic

Sabranic
  • Members
  • 306 messages

Ok, there's a few things you have to do to implement such an item.

The first thing is a script that awards the proper item somewhere from a conversation (usually the best):

This script will teleport you to an object with a tag of "teleport_waypoint", of course you have to add somewhere (in the zone where you want to teleport to) a waypoint object with that tag.
Anyways, this should do it, hopefully that helped.

 

P.S. You can post the alpha of your campaign in the "Modules" section of the forum.

 

This worked perfectly.  Thank you VERY much for this.  I appreciate the help everyone gave me to no end.  I am going to package the magnificent mansion as a stand alone now and put up a link for anyone that would like to use it.

 

EDIT: I got the Mansion and the scripts it uses as a stand alone, I will upload it tonight after work.


  • GCoyote aime ceci

#16
_Knightmare_

_Knightmare_
  • Members
  • 643 messages

Oh that's a really exceptional idea - it basically creates a "door."  I'm trying to get what's been suggested so far working, but I'd still love to see what you have.

 

I have to still go through the effort of "reclaiming" my Vault page, so for now I uploaded stuff to a Google drive. It was (one of) my Script Building modules so there is some other stuff in there too. Feel free to have a look around. I can't guarentee all the needed assets are there, but I thinkso. At least enough to see what is happening anyway. :)

 

https://drive.google...iew?usp=sharing


  • Sabranic aime ceci

#17
Sabranic

Sabranic
  • Members
  • 306 messages

I have to still go through the effort of "reclaiming" my Vault page, so for now I uploaded stuff to a Google drive. It was (one of) my Script Building modules so there is some other stuff in there too. Feel free to have a look around. I can't guarentee all the needed assets are there, but I thinkso. At least enough to see what is happening anyway. :)

 

https://drive.google...iew?usp=sharing

 

Thanks so much!  I appreciate!


  • _Knightmare_ aime ceci

#18
Sabranic

Sabranic
  • Members
  • 306 messages

Link to the finished product: http://forum.bioware...ampaign-add-on/

 

Thanks to all of you for the help, you've all been credited in the documentation.  This is really wonderful and I am highly appreciative of the assistance. 



#19
_Knightmare_

_Knightmare_
  • Members
  • 643 messages

Thanks so much!  I appreciate!

Sure thing. let me know if there are any missing resources or whatever, or if it is even useful to you lol. :)


  • Sabranic aime ceci