Scripted Shopkeeper [message #24168] |
Wed, 15 August 2007 23:55 |
|
Keshire
Messages: 1266 Registered: July 2005
|
Administrator
|
|
|
Along the lines of my experience pedestool, and Customizable NPC. Here is a stand alone shopkeeper where you can define his stock through scripts.
Random Empty traders fixed by Sean_s.
Relevant tng code:
DefinitionType "CREATURE_TRADER_STOCKED_SCRIPTED"; or "SCRIPTED_SHOP"
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCShop;
StockItemDefsKeys[0] "OBJECT_KESHIRE_SICKLE";
StockItemDefsQuantity[0] 1.0;
StockItemDefsMaxStock[0] 1.0;
EndCTCShop;
by leaving the Persistent to FALSE, the shopkeeper will not be stored within the save game. Meaning you can continually edit his stock even after saving. (This probably works with chests too. Not sure.)
Also, obviously the [#] works the same as all ctc's that use that syntax.
StockItemDefsKeys[0] "OBJECT_KESHIRE_SICKLE";
StockItemDefsQuantity[0] 1.0;
StockItemDefsMaxStock[0] 1.0;
StockItemDefsKeys[1] "OBJECT_";
StockItemDefsQuantity[1] 1.0;
StockItemDefsMaxStock[1] 1.0;
StockItemDefsKeys[2] "OBJECT_";
StockItemDefsQuantity[2] 1.0;
StockItemDefsMaxStock[2] 1.0;
StockItemDefsKeys[3] "OBJECT_";
StockItemDefsQuantity[3] 1.0;
StockItemDefsMaxStock[3] 1.0;
Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
[Updated on: Thu, 16 August 2007 01:02] Report message to a moderator
|
|
|
|
Re: Scripted Shopkeeper [message #24178 is a reply to message #24168] |
Thu, 16 August 2007 00:31 |
|
Sean_s
Messages: 576 Registered: June 2007 Location: Ohio
|
|
|
|
Hey Blue, do you mind if I make a version of this that adds a unique trader and shop (yours, only made into new entry's) so that you don't sometimes run into a trader with nothing in his shop?
New? Or looking for information? Look here before posting.
Help the community by adding this to your sig!
Assistant for Conquest
By the way, call me Searyan
[Updated on: Thu, 16 August 2007 00:32] Report message to a moderator
|
|
|
|
Re: Scripted Shopkeeper [message #24180 is a reply to message #24168] |
Thu, 16 August 2007 00:39 |
|
Sean_s
Messages: 576 Registered: June 2007 Location: Ohio
|
|
|
|
Here it is.
Creature name
CREATURE_TRADER_STOCKED_SCRIPTED
Shops name
SCRIPTED_SHOP
Fmp moved to first post - BlueTooth
New? Or looking for information? Look here before posting.
Help the community by adding this to your sig!
Assistant for Conquest
By the way, call me Searyan
[Updated on: Thu, 16 August 2007 01:02] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Scripted Shopkeeper [message #25623 is a reply to message #24168] |
Fri, 31 August 2007 10:13 |
|
Satan
Messages: 1033 Registered: September 2005 Location: Hades
|
Administrator
|
|
|
If you can spawn chests you can do this, and if you can't it's a good way to get into tng editing.
There is nothing in the Void.
There is no point to it's being.
I wish there was a reason.
There is nothing in the Void,
But what we put there.
[Updated on: Fri, 31 August 2007 10:13] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: Scripted Shopkeeper [message #27422 is a reply to message #24168] |
Mon, 17 September 2007 03:15 |
|
Sean_s
Messages: 576 Registered: June 2007 Location: Ohio
|
|
|
|
Ok thanks, but like I said in the morning, I wasn't kidding about it being 6 here (6:15 am now).
Edit
Never mind, here it is, I couldn't stand needing to sleep to fix it (the FMP only has two entry's and I only needed to change one thing, so yeah, easy fix).
New? Or looking for information? Look here before posting.
Help the community by adding this to your sig!
Assistant for Conquest
By the way, call me Searyan
[Updated on: Mon, 17 September 2007 03:22] Report message to a moderator
|
|
|
|
|
|
Re: Scripted Shopkeeper [message #27999 is a reply to message #27465] |
Thu, 20 September 2007 10:05 |
|
Ok, I've been trying to use the scripted shopkeeper in combination with a couple of new weapons and new clothing objects.
So far weapons work just fine, but the clothing sometimes does and sometimes doesn't work.
Example:
I load these mods:
I use this script:
SCRIPT USEDNewThing AICreature;
Player 2;
UID 18446712341011018629;
DefinitionType "CREATURE_TRADER_STOCKED_SCRIPTED";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsNavigator;
PositionX 14.5;
PositionY 124.0;
PositionZ 26.5;
RHSetForwardX 1.000000;
RHSetForwardY 0.000000;
RHSetForwardZ 0.000000;
RHSetUpX 0.000000;
RHSetUpY 0.000000;
RHSetUpZ 1.000000;
EndCTCPhysicsNavigator;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCContainerRewardHero;
EndCTCContainerRewardHero;
StartCTCEnemy;
FriendsWithEverythingFlag FALSE;
EnableFollowersEnemyProxy TRUE;
FactionName "";
EndCTCEnemy;
StartCTCShop;
StockItemDefsKeys[0] "OBJECT_HERO_MASK_STEALTH";
StockItemDefsQuantity[0] 5.0;
StockItemDefsMaxStock[0] 10.0;
StockItemDefsKeys[1] "OBJECT_HERO_HAT_NIHILUS_MASK";
StockItemDefsQuantity[0] 5.0;
StockItemDefsMaxStock[0] 10.0;
StockItemDefsKeys[2] "OBJECT_HERO_BOOTS_JACK";
StockItemDefsQuantity[0] 5.0;
StockItemDefsMaxStock[0] 10.0;
StockItemDefsKeys[3] "OBJECT_HERO_SHIRT_JACK";
StockItemDefsQuantity[0] 5.0;
StockItemDefsMaxStock[0] 10.0;
StockItemDefsKeys[4] "OBJECT_HERO_TROUSERS_JACK";
StockItemDefsQuantity[0] 5.0;
StockItemDefsMaxStock[0] 10.0;
EndCTCShop;
Health 200.0;
EnableCreatureAutoPlacing FALSE;
EndThing;
Now in-game, when I look at the traders merchandise only the Assassin Mask and Jack's Trousers are there.
I've been searching through the CDefs for an answer... but no luck so far.
Who's more lucky or knows the answer???
-Also: as stated before, weapons work fine so far-
-If you spawn Thunder's helmet (from Buetooth suits) in the traders inventory, it crashes the game-
|
|
|
Re: Scripted Shopkeeper [message #28014 is a reply to message #24168] |
Thu, 20 September 2007 12:26 |
|
Satan
Messages: 1033 Registered: September 2005 Location: Hades
|
Administrator
|
|
|
Don't know if this'll help but this guy sells the JOB outfit fine in my game. His coords are for GuildExterior.tng.
Shopkeeper script
NewThing AICreature;
Player 2;
UID 18446741874686298880;
DefinitionType "CREATURE_HERO_RIVAL_GOOD_01";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsNavigator;
PositionX 9.583252;
PositionY 120.747100;
PositionZ 27.176630;
RHSetForwardX 0.714565;
RHSetForwardY 0.699569;
RHSetForwardZ 0.000000;
RHSetUpX 0.000000;
RHSetUpY 0.000000;
RHSetUpZ 1.000000;
EndCTCPhysicsNavigator;
StartCTCRandomAppearanceMorph;
Seed -859535768;
EndCTCRandomAppearanceMorph;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCTalk;
EndCTCTalk;
StartCTCEditor;
EndCTCEditor;
StartCTCVillageMember;
VillageUID 0;
EndCTCVillageMember;
StartCTCHeroMorph;
Strength 1.0;
Will 0.5;
Skill 1.0;
Age 0.5;
Morality 0.0;
Fatness 0.0;
Tan 1.0;
EndCTCHeroMorph;
StartCTCHeroAttachableAppearanceModifiers;
HairModifierNames[0] "OBJECT_HERO_TASHKHG_01";
HairModifierNames[1] "OBJECT_HERO_BEARD_LONG_01";
HairModifierNames[2] "OBJECT_HERO_HORNS";
HairModifierNames[3] "OBJECT_HERO_BOOTS_LEATHERARMOUR_EVIL";
HairModifierNames[4] "OBJECT_HERO_TROUSERS_LEATHERARMOUR_EVIL";
HairModifierNames[5] "OBJECT_HERO_SHIRT_LEATHERARMOUR_EVIL";
HairModifierNames[6] "OBJECT_HERO_GLOVES_LEATHERARMOUR_EVIL";
EndCTCHeroAttachableAppearanceModifiers;
StartCTCShop;
StockItemDefsKeys[0] "OBJECT_HERO_HAT_JOB_MASK";
StockItemDefsQuantity[0] 1.0;
StockItemDefsMaxStock[0] 1.0;
StockItemDefsKeys[1] "OBJECT_HERO_SHIRT_JACK";
StockItemDefsQuantity[1] 1.0;
StockItemDefsMaxStock[1] 1.0;
StockItemDefsKeys[2] "OBJECT_HERO_TROUSERS_JACK";
StockItemDefsQuantity[2] 1.0;
StockItemDefsMaxStock[2] 1.0;
StockItemDefsKeys[3] "OBJECT_HERO_BOOTS_JACK";
StockItemDefsQuantity[3] 1.0;
StockItemDefsMaxStock[3] 1.0;
StockItemDefsKeys[4] "OBJECT_SWORD_OF_AEONS";
StockItemDefsQuantity[4] 1.0;
StockItemDefsMaxStock[4] 1.0;
EndCTCShop;
StartCTCContainerRewardHero;
EndCTCContainerRewardHero;
StartCTCEnemy;
FriendsWithEverythingFlag FALSE;
EnableFollowersEnemyProxy TRUE;
FactionName "";
EndCTCEnemy;
Health 10000.0;
OverridingBrainName NULL;
HasInformation FALSE;
WanderWithInformation FALSE;
WaveWithInformation FALSE;
ContinueAIWithInformation FALSE;
EnableCreatureAutoPlacing FALSE;
AllowedToFollowHero FALSE;
RegionFollowingOverriddenFromScript FALSE;
RespondingToFollowAndWait TRUE;
CanBeCourted FALSE;
CanBeMarried FALSE;
InitialPosX 1899.038574;
InitialPosY 2110.61084;
InitialPosZ 31.511845;
EndThing;
There is nothing in the Void.
There is no point to it's being.
I wish there was a reason.
There is nothing in the Void,
But what we put there.
[Updated on: Thu, 20 September 2007 12:30] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Re: Scripted Shopkeeper [message #47058 is a reply to message #47037] |
Sun, 09 November 2008 07:05 |
|
JohnDoe wrote on Sat, 08 November 2008 11:11 | The only other thing I can think of is the existence of the OBJECT entries. With a chest, it doesn't matter, since if it doesn't exist, it is skipped. With this, though, it might matter.
But that's only with the assumption that you either didn't install the mods or that you screwed up the mods.
Other than that, I've got no clue. Can't spot a problem with the script.
|
I don't understand the first thing you said O.O
All i did what replace the silver key there with the script.
It's hard to screw up a copy and paste job really.
Ugh i hate it when things go wrong and mo mistake seems to be there
EDIT: I do understand the first thing you said, lol
So i changed NewThing Object; to NewThing AICreature;
And no luck. Still crashes. I still don't understand.
[Updated on: Sun, 09 November 2008 07:14] Report message to a moderator
|
|
|
Re: Scripted Shopkeeper [message #47060 is a reply to message #47058] |
Sun, 09 November 2008 08:41 |
|
JohnDoe
Messages: 3007 Registered: October 2007
|
Retired
|
|
|
I missed the NewThing Object; thing because, well, that one's my fault. That's what I put there. That aside, that wasn't what I was talking about, good eyes though.
When you spawn a chest and put in items that don't exist, such as "OBJECT_NOMNOMNOM", it will be skipped. What I was saying earlier is that this could be a different problem with the trader, and instead of him skipping the item, the game crashes. This can happen if you misspelled an item or if you screwed up while installing the mods (or did any combination of any number of user errors that could cause this). That said, go in FE and see if the mods are installed correctly.
Another thing, you could see if it is even the trader causing the crash. Take out the trader script and run the game. If it works, the script is screwed up somewhere (somewhere else I mean) and we just haven't spotted it yet. If it doesn't work, it's not the script, and you screwed up somewhere else.
Also, try changing the UID, something that doesn't start with a string of zeroes.
[Updated on: Sun, 09 November 2008 08:41] Report message to a moderator
|
|
|
Re: Scripted Shopkeeper [message #56886 is a reply to message #24168] |
Sat, 17 April 2010 12:37 |
naast
Messages: 1 Registered: April 2010
|
|
|
|
Hi guys. Can someone explain how to spawn a shopkeeper?
I'm new to modding so I don't understand everything about scripting.
As far as I understood, I have to load the .fmp file on FE, and make a script to spawn a shopkeeper, and that's all? Or do I need to add an entry for that shop on FE?
|
|
|
|
Re: Scripted Shopkeeper [message #65411 is a reply to message #25652] |
Thu, 08 December 2011 09:21 |
|
madmerlin420
Messages: 7 Registered: December 2011
|
|
|
|
groo wrote on Sat, 01 September 2007 12:08 | oh god, now im gonna have to have a secret shopkeeper in the Bowerstone Graveyard in Darkened Souls
|
lolz imma have one in The Secret Haven in rose cottage ^^
|
|
|