Home » Fable TLC » Discussion » Level Scripting » JohnDoe's Item Spawning Guides
() 2 Votes
JohnDoe's Item Spawning Guides [message #37587] |
Sun, 03 February 2008 03:07 |
|
JohnDoe
Messages: 3007 Registered: October 2007
|
Retired
|
|
|
.:: NOTES - DO READ
If you adamantly do not wish to use FreeRoam or can't use FreeRoam because you have an FE-compiled wad archive, you can import/export tngs using FE.
If you have successfully used the newer (zipped) version of AlbionExplorer or ChocolateBox, you may not need to do step 1 as these tools dump & rename the FinalAlbion.wad and edit the userst.ini.
If you're going to make one of those huge chests (there's no limit) I recommend you use this handy dandy tool to do it for you. It's easy to make mistakes, we all make them. This is just to help keep from making simple, yet hard to spot, mistakes.
For those who like text editing the TNGs, maybe I can turn you onto using the TNG Parser, a good tool to quickly navigate and edit the tng text.
.:: On to the guide
Prerequisites:
Eyes;
Brain;
The ability to read;
FreeRoam (link supplied); and
Text Editor.
List of decent text editors:NotePad (winkey+r, notepad) (bad for large replacement jobs);
WordPad (winkey+r, wordpad) (don't use rich text!) (bad for big jobs);
EditPad Lite (OldBoy approves it!);
Crimson Editor (morerunes approves it!);
SciTE (I never could figure out how to make this work, but it could be useful with SciTE);
NotePad2 (I approve it!);
NotePad++ (never used it);
More as they are recommended.
The easiest way to spawn chest is to use the FreeRoam App and edit the tng.
The other method is to extract the tng from the wad, make the edit, and import the tng back into the wad.
I'm going with the FreeRoam App, as it's faster and easier than the tng extract/import via FE method. This is all described in Step 1.
Step 2 involves, in detail, the actual tng editing that takes place using the text editor method.
Hijacking a chest is an easier, but limited, step 2.
Step 1Click here to get FreeRoam.
To use FreeRoam:
1. Download FreeRoam;
2. Extract FreeRoam (it'll be zip);
3. Open FreeRoam;
4. Click File|Open;
5. Select the wad file in the Fable directory\data\levels\;
6. Dump in the data folder ( in the DATA folder, not levels);
7. Rename, move or delete the wad file (recommend renaming, it can be used as a backup should you obliterate your tngs).
Now, should you end up with a directory that looks like data\levels\levels\ then you screwed up step 6. Just take everything from the second levels folder and put it in the first.
If you got it right, congrats.
If you've read elsewhere to edit the userst.ini, don't worry about it. It's not needed, so it's not mentioned here (but you can do it anyway, it makes no difference). Step 2This is the actual spawning of the chest. There are many ways of going about this. My personal favorite is the text editor method. PreparationsOpen up a tng in any text editor, I would recommend a tng that you can actually get to (example, if you haven't made it to SnowSpire yet, don't put a chest in SnowSpire).
I'll use GuildExterior.tng (right outside the guild).
Find XXXSectionStart NULL and throw a chest script right under that, this is so that the chest is always there and not part of a quest that has to be activated for the chest to show up. Template ChestExample chest script: (I'll be working off of this) NewThing Object;
Player 4;
UID 00000000000000000000;
DefinitionType "OBJECT_CHEST_OPENABLE";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 0.000000;
PositionY 0.000000;
PositionZ 0.000000;
RHSetForwardX 0.000000;
RHSetForwardY 1.000000;
RHSetForwardZ 0.000000;
RHSetUpX 0.000000;
RHSetUpY 0.000000;
RHSetUpZ 1.000000;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCChest;
ContainerContents[0] "OBJECT_SOMETHING_OR_OTHER";
ChestOpen FALSE;
EndCTCChest;
Health 1.0;
EndThing; This will serve as a template. New UIDFirst it needs a new UID. Traditional UIDs are 20 digits. I recommend bashing random numbers until you're close to around 20 digits, like so: We're going for completely random, larger than 0 (no negatives, no long strings of 0's), around 20 digits or so, and unique to the map. CoordinatesNext, it needs coordinates, all that needs to be focused on is PositionX 0.000000;
PositionY 0.000000;
PositionZ 0.000000; Actually, I think Z is irrelevant, as if the chest is too high it falls down, if it's too low it comes up to ground level. Just in case, it'll be a part of this crash course to chest spawning.
Take the coordinates from something else, something easy to recognize, something easy to find in-game. For GuildExterior.tng, an easy spot would be the BUILDING_GUILD_EXTERIOR_SHOP_TITLE_VENDOR. PositionX 17.76123;
PositionY 112.865479;
PositionZ 26.5; Now the problem is that the chest and the stall will spawn at the exact same place. I'll take the coordinates and change them up a bit. I'm going to take the coordinates of something else so I can get an idea of where my chest will go.
The guild doors are at PositionX 22.95459;
PositionY 121.468994;
PositionZ 26.5; So increasing X would make my chest go North and increasing Y would make my chest go West. I know this because I look at the minimaps included with AE and use my knowledge of where these two objects are in-game. So I'll change my coordinates to PositionX 18.000000;
PositionY 124.000000;
PositionZ 26.5; That should make the chest pop up on the path to the center of Lookout Point. ContainerContentsNow, the chest needs something in it. Grab a copy of the decompiled names.bin or open FE. The decompiled names.bin has a list of all existing objects, but also has everything else in the names.bin, so just look for the things that start with OBJECT_ and that will narrow your search for what you're looking for, unless of course you want to spawn a building. You could also open FE and scroll down to OBJECT and take something out of the list there. If you have new objects that you got from a mod or made yourself, you'll have to grab it out of FE.
So, I have this list of stuff I want in my chest.
To make it easy I'll use one of these tools (there are two tools in that thread).
I end up with ContainerContents[0] "OBJECT_CARROT";
ContainerContents[1] "OBJECT_TOFU";
ContainerContents[2] "OBJECT_MANA_POTION";
ContainerContents[3] "OBJECT_ADRENALINE_POTION";
ContainerContents[4] "OBJECT_THROWING_ORB_SLOWTIME";
ContainerContents[5] "OBJECT_FISHING_ROD_UPGRADED";
ContainerContents[6] "OBJECT_SPADE";
ContainerContents[7] "OBJECT_RESURRECTION_PHIAL";
ContainerContents[8] "OBJECT_SILVER_KEY";
ContainerContents[9] "OBJECT_WEDDING_RING";
ContainerContents[10] "OBJECT_TATTOO_CARD_CHEST_03";
ContainerContents[11] "OBJECT_TATTOO_CARD_FACE_02";
ContainerContents[12] "OBJECT_DOLL_JACK_OF_BLADES_01";
ContainerContents[13] "OBJECT_TROPHY_DRAGON_SCALE_01";
ContainerContents[14] "OBJECT_GOLD_1000000";
ContainerContents[15] "OBJECT_CRYSTAL_LONGSWORD";
ContainerContents[16] "OBJECT_SWORD_OF_AEONS_GOOD_01";
ContainerContents[17] "OBJECT_LEGENDARY_PUMPCROSSBOW"; There. Take notice that each number goes up by one, it must stay in that order, 0, 1, 2, 3, 4, n. If it is out of order, Fable dies. Notice that each object name is in quotes, if it's not, Fable dies. Notice each line ends with a semicolon ( ; ), if you're missing one, Fable dies. If an object is called but doesn't exist, for example, OBJECT_TOF, it is skipped. If it's the only object in the chest, or if all the objects are non-existent, you will freeze and be unable to move, stuck staring at the inside of a glowing chest. Fable doesn't die from this, but you have to kill it to get out, so Fable dies. Finished productSo let's take a look at the completed script: NewThing Object;
Player 4;
UID 78932678907893657895;
DefinitionType "OBJECT_CHEST_OPENABLE";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 18.000000;
PositionY 124.000000;
PositionZ 26.5;
RHSetForwardX 0.000000;
RHSetForwardY 1.000000;
RHSetForwardZ 0.000000;
RHSetUpX 0.000000;
RHSetUpY 0.000000;
RHSetUpZ 1.000000;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCChest;
ContainerContents[0] "OBJECT_CARROT";
ContainerContents[1] "OBJECT_TOFU";
ContainerContents[2] "OBJECT_MANA_POTION";
ContainerContents[3] "OBJECT_ADRENALINE_POTION";
ContainerContents[4] "OBJECT_THROWING_ORB_SLOWTIME";
ContainerContents[5] "OBJECT_FISHING_ROD_UPGRADED";
ContainerContents[6] "OBJECT_SPADE";
ContainerContents[7] "OBJECT_RESURRECTION_PHIAL";
ContainerContents[8] "OBJECT_SILVER_KEY";
ContainerContents[9] "OBJECT_WEDDING_RING";
ContainerContents[10] "OBJECT_TATTOO_CARD_CHEST_03";
ContainerContents[11] "OBJECT_TATTOO_CARD_FACE_02";
ContainerContents[12] "OBJECT_DOLL_JACK_OF_BLADES_01";
ContainerContents[13] "OBJECT_TROPHY_DRAGON_SCALE_01";
ContainerContents[14] "OBJECT_GOLD_1000000";
ContainerContents[15] "OBJECT_CRYSTAL_LONGSWORD";
ContainerContents[16] "OBJECT_SWORD_OF_AEONS_GOOD_01";
ContainerContents[17] "OBJECT_LEGENDARY_PUMPCROSSBOW";
ChestOpen FALSE;
EndCTCChest;
Health 1.0;
EndThing; Done deal. Have fun with your new chest. Hijacking a chestAnother fun way to go about this is to hijack an existing chest. For this to work though, your gamesave must not have already "seen" the chest, or be anywhere that contains/sees the map the chest is on. This has to do with the UID, I'll get into that later.
Find a tng that you haven't been to yet, but can easily reach. I'll use a demon door.
So I've opened DemonDoor_Guild.tng, and I found my chest. It currently contains OBJECT_SUPER_HEALTH_POTION, but I'll just change that into any object I want, and I want OBJECT_TOFU. The "new" chest script should look like NewThing Object;
Player 4;
UID 18446741874686296067;
DefinitionType "OBJECT_CHEST_OPENABLE";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 40.078613;
PositionY 22.092041;
PositionZ 5.0;
RHSetForwardX 0.0;
RHSetForwardY 0.999994;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 0.999994;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCChest;
ContainerContents[0] "OBJECT_TOFU";
ChestOpen FALSE;
EndCTCChest;
Health 1.0;
EndThing; All that's different is the contents. Now, if I have already been there, regardless of whether or not I opened the chest, I can't change the contents because the damn save file has sucked up all the info it needs to remember what is supposed to be in that chest. What I can do is change the UID, effectively "tricking" Fable into thinking there is a new chest there. It's weird though, because the chest will be inside the "replaced" one. A way to get around this is to change one of the coordinates by 2 or 3. So instead of I will have which moves it enough for it to look right. Non-chest spawningThis is written by OrionSR, he get's credit for this piece. OrionSR wrote on Wed, 03 December 2008 23:51 |
Chest Rotations: 3 examplesNewThing Object;
Player 4;
UID 78922678907893657895;
DefinitionType "OBJECT_CHEST_OPENABLE";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 18.0;
PositionY 124.0;
PositionZ 26.5;
RHSetForwardX 0.0;
RHSetForwardY -1.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCChest;
ContainerContents[0] "OBJECT_FISHING_ROD_UPGRADED";
ContainerContents[1] "OBJECT_SPADE";
ChestOpen FALSE;
EndCTCChest;
Health 1.0;
EndThing;
NewThing Object;
Player 4;
UID 78932678907893657895;
DefinitionType "OBJECT_NW_CHEST_OPENABLE";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 18.0;
PositionY 128.0;
PositionZ 26.5;
RHSetForwardX 0.0;
RHSetForwardY 1.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCChest;
ContainerContents[0] "OBJECT_HERO_HAT_WIZARD";
ContainerContents[1] "OBJECT_HERO_HAT_WIZARD_EVIL";
ContainerContents[2] "OBJECT_HERO_HAT_WIZARD_GOOD";
ChestOpen FALSE;
EndCTCChest;
Health 1.0;
EndThing;
NewThing Object;
Player 4;
UID 78912678907893657895;
DefinitionType "OBJECT_SILVERKEY_CHEST_5";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 16.0;
PositionY 126.0;
PositionZ 26.5;
RHSetForwardX -1.0;
RHSetForwardY 0.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCChest;
ContainerContents[0] "OBJECT_SUPER_HEALTH_POTION";
ContainerContents[1] "OBJECT_SUPER_MANA_POTION";
ContainerContents[2] "OBJECT_SUPER_HEALTH_POTION";
ContainerContents[3] "OBJECT_SUPER_MANA_POTION";
ChestOpen FALSE;
EndCTCChest;
Health 1.0;
EndThing; The items in chests require clicking after each item. This can be frustrating if multiple copies of the same item are contained in the chests. However, the rewards from Barrels only require a click on new items. Otherwise they simply display a small icon indicating how many items were collected. The other nice thing about barrels is they disappear when they are broken so they don't clutter the map. Be sure to collect the reward before leaving the area.Multiple copies of an item in a barrel.NewThing Object;
Player 4;
UID 78966741874686296086;
DefinitionType "OBJECT_BARREL_BREAKABLE";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 17.0;
PositionY 133.0;
PositionZ 27.4;
RHSetForwardX 0.0;
RHSetForwardY 1.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCVillageMember;
VillageUID 0;
EndCTCVillageMember;
StartCTCContainerRewardHero;
ContainerContents[0] "OBJECT_MANA_AUGMENTATION";
ContainerContents[1] "OBJECT_MANA_AUGMENTATION";
ContainerContents[2] "OBJECT_MANA_AUGMENTATION";
ContainerContents[3] "OBJECT_MANA_AUGMENTATION";
ContainerContents[4] "OBJECT_MANA_AUGMENTATION";
ContainerContents[5] "OBJECT_MANA_AUGMENTATION";
ContainerContents[6] "OBJECT_MANA_AUGMENTATION";
ContainerContents[7] "OBJECT_MANA_AUGMENTATION";
ContainerContents[8] "OBJECT_MANA_AUGMENTATION";
ContainerContents[9] "OBJECT_MANA_AUGMENTATION";
EndCTCContainerRewardHero;
Health 1.0;
EndThing; The Guild Bookcase Select objects appear to be unique in their ability to respawn their items after they've already been collected. This seems to be useful for spawning items that may need to be recollected. I've been placing Hero Titles on the shelves in the Guild Interior. In this example I placed some silver keys for opening the chest spawned in the example above. The main problem is that the Select object is just a frame. An associated bookcase is needed to make things look right, but the frame works fine without it.Respawning Items of the Guild Bookcase SelectNewThing Object;
Player 4;
UID 78946741874686296370;
DefinitionType "OBJECT_GUILD_BOOKCASE_SELECT_MEDIUM";
CreateTC "CTCOwnedEntity";
ScriptName NULL;
ScriptData NULL;
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 20.0;
PositionY 130.0;
PositionZ 27.25;
RHSetForwardX 0.0;
RHSetForwardY -1.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCOwnedEntity;
SwitchableNavigationTCAdded FALSE;
VersionNumber 1;
OwnerUID 18446741874686296065;
EndCTCOwnedEntity;
StartCTCSearchableContainer;
ContainerContents[0] "OBJECT_SILVER_KEY";
ContainerContents[1] "OBJECT_SILVER_KEY";
ContainerContents[2] "OBJECT_SILVER_KEY";
ContainerContents[3] "OBJECT_GOLD_1000000";
NumberOfTimesToSearch 0;
EndCTCSearchableContainer;
Health 1.0;
EndThing;
NewThing Object;
Player 4;
UID 78956741874686301588;
DefinitionType "OBJECT_GUILD_BOOKCASE_MEDIUM_01";
CreateTC "CTCOwnedEntity";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 19.8;
PositionY 130.0;
PositionZ 26.5;
RHSetForwardX -1.0;
RHSetForwardY 0.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCEditor;
EndCTCEditor;
StartCTCOwnedEntity;
SwitchableNavigationTCAdded FALSE;
VersionNumber 1;
OwnerUID 18446741874686296485;
EndCTCOwnedEntity;
Health 1.0;
CanComeBetweenCameraAndHero 0;
EndThing; This last example is probably a bit off-topic, but I'll risk posting it anyway because I had a hard time finding reference on the method. Individual weapons can be spawned with augments already attached. Not only does this save the hassle of spawning the augments, but more augments can be added than is usually possible without a great deal more editing. So far, it looks like melee weapons are limited to 5 augments, and ranged weapons have a limit of 4, but I haven't mess with many examples just yet.Spawning a Pre-Augmented WeaponNewThing Object;
Player 4;
UID 78976741874686298454;
DefinitionType "OBJECT_MINION_WEAPON_DREADWINGS_RANGED";
CreateTC "CTCOwnedEntity";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent TRUE;
ThingLevelPersistent TRUE;
StartCTCPhysicsStandard;
PositionX 18.37305;
PositionY 137.45800;
PositionZ 29.05913;
RHSetForwardX 0.77440;
RHSetForwardY -0.01878;
RHSetForwardZ -0.63241;
RHSetUpX -0.34657;
RHSetUpY 0.72669;
RHSetUpZ -0.59314;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCInventoryItem;
InventoryUID 0;
EndCTCInventoryItem;
StartCTCEditor;
EndCTCEditor;
StartCTCOwnedEntity;
SwitchableNavigationTCAdded FALSE;
VersionNumber 1;
OwnerUID 18446741874686296152;
EndCTCOwnedEntity;
StartCTCStockItem;
ForSale FALSE;
Stealable TRUE;
Price 498;
EndCTCStockItem;
StartCTCObjectAugmentations;
SavedInGame TRUE;
AugmentationDefNames[0] "OBJECT_MANA_AUGMENTATION";
AugmentationDefNames[1] "OBJECT_MANA_AUGMENTATION";
AugmentationDefNames[2] "OBJECT_MANA_AUGMENTATION";
AugmentationDefNames[3] "OBJECT_MANA_AUGMENTATION";
EndCTCObjectAugmentations;
Health 1.0;
EndThing; I've really been enjoying the Ranged Minion weapon in the example above. It has a very high firing rate and each hit contributes to Will experience with no mana cost.
|
I also have here a more in-depth look at item spawning. This is more advanced because it goes into great detail about CTCs, different types of scripts, etc. and such and so on. Read it if you want to learn more.New Guide: JohnDoe's Item Spawning 101I wrote this to be the definitive guide for TNG spawning. If you have a suggestion for improvements or comments, please share. If you have questions unrelated to the lesson plan, ask away. If you have questions about the instructions, read it over again (it's not that I don't care, I just want you to ask for help the right way, as told in this guide). DescriptionIn this thread you will learn how to spawn items using chests, coffins, barrels, and searchable containers. You will also learn how to spawn objects directly onto the map. Each lesson will be broken up into tiny pieces, all gathered together and tucked away in a spoiler. This guide is written to be used sequentially; don't skip any piece, read it in order.
You follow all of the instructions, learn from the lessons and don't just try to rush so that you can have some chest or something, and you'll be able to spawn nearly anything you want in nearly any way you want. Lesson 1 - Understanding the FinalAlbion.wadThe FinalAlbion.wad is an archive that holds all of the data for the levels and level scripts used in Fable. The levels aren't relevant to any of my lessons here, so I'll just say that they're map attributes in lev files inside the FinalAlbion.wad. The scripts, however, are very important, for starters, they control what goes where on the maps in TNG files inside the FinalAlbion.wad. I'll explain those more later. If you want to spawn a chest, searchable containers or anything, for that matter, you need to edit a TNG. Even if you edit the FinalAlbion.wad directly, you're still editing a TNG. Back to the FinalAlbion.wad, it's like a zip file, you need to unzip the contents to put them to good use. Except the FinalAlbion.wad can't be opened in WinZip or anything like that. Lesson 2 - Dumping the FinalAlbion.wad** DO READ **
Pre-lesson notes:
Before doing anything, you need to know that the apps here require .NET Framework of various versions. Be safe and get .NET Framework 3.5.
If you're on Vista and you're about to poke around in Program Files, you need permission to do so. Read this.
To do any of the cool stuff with the scripts, you need to be able to access the scripts. There are a number of ways to do that. You can open AlbionExplorer or ChocolateBox (you need to grab those prerequisites) and it will properly dump the FinalAlbion.wad for you. No fuss no muss.
If you've already used a mod that edits the FinalAlbion.wad using FE, or if you've already edited a wad entry using FE, you won't be able to use the previous options. You'll be limited to hand-editing the TNGs, and you'll have to extract them using FableExplorer (or FE w/Search or ShadowNet FE) to access the FinalAlbion.wad. Follow this guide to learn how to do that. Once you've extracted the TNGs you want, continue with the guide.
If you don't want to do that, or can't because you think you can't use those apps, use FreeRoam instead. This is what I use. Simply because I like it. Now follow the instructions closely because too many people fuck this up and I won't help them anymore.
FreeRoam Instructions- If you run Vista, read this;
- Extract FreeRoam to a permanent location on your hard drive (it'll be zip, don't run it from the zip);
- Open FreeRoam;
- Click File|Open;
- Select the FinalAlbion.wad file in the (Fable directory)\data\levels\;
- DO NOT DUMP IN THE LEVELS FOLDER, dump in the data folder (in the DATA folder, not levels), hope I've been clear enough on that;
- Rename, move or delete the FinalAlbion.wad file (I recommend renaming, it can be used as a backup should you obliterate your TNGs).
If you've read elsewhere to edit the userst.ini, don't worry about it. It's not needed, so it's not mentioned here.
Problems with FreeRoam?
Did you get "The application failed to initialize properly (0xC0000135). Click on OK to termniate the application."? You have a complete absence of .NET Framework (I provided a link for the latest .NET Framework in the pre-lesson notes).
Did you get "Unable to read beyond the end of the stream." or "The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System.Text.DecoderReplacementFallback'. Parameter name: chars."? Either you're not selecting the right file (there's only one wad file, idiot) or you are trying to dump from an FE-compiled FinalAlbion.wad. If the latter, you'll need to get a clean FinalAlbion.wad off of disc #2 or, if you don't want to undo your level edits, extract the TNGs one at a time using FableExplorer (as explained earlier in the lesson).
Did you get the error: "Try to select a file next time."? Select a file, idiot. Step 5.
Did you end up with a data\levels\levels\FinalAlbion directory? You dumped in the levels folder, idiot. Step 6.
Are your edits not showing up in-game? Idiot. Step 7.
Do you get some other unexplainable error where stuff just isn't working? Are you on Vista? Idiot. Pre-lesson notes.
If you still can't fix the problem, don't just make a post asking for help. Do some groundwork first.
Open command prompt (winkey+r/Start>>Run, type in cmd and press enter).
In the command prompt, type in (or copy this, right-click in the prompt, and select paste):
CD C:\Program Files\Microsoft Games\Fable - The Lost Chapters\data\Levels
Then, do the same for this:
DIR /B /S *.* > LevelsDirectory.txt
Now, in C:\Program Files\Microsoft Games\Fable - The Lost Chapters\data\Levels, there will be a text file called LevelsDirectory.txt. This will give us a visual reference of what's going on, a list of all of the files in your levels directory. Upload that text file when you make your request for help.
Please note that if you installed anywhere other than the default install location, you'll need to adjust the directory names accordingly.
In your request for help, include all information about what you did, with what, in what order, how, and what you had for breakfast the day all this happened. Details are very important.
Lesson 3 - The TNGsWith the FinalAlbion.wad dumped and renamed, you can use AlbionExplorer or ChocolateBox to do level edits. If you want to have a full understanding, keep reading.
TNGs are plain text files containing scripts used by Fable to determine what goes where. TNGs can be simple but can also be complex. I won't get into that. I'll just be discussing how to spawn items here. Being plain text files, you can open TNGs in any text editor. List of text editorsNotePad (winkey+r, notepad) (bad for large replacement jobs);
WordPad (winkey+r, wordpad) (don't use rich text!) (bad for big jobs);
Microsoft Word (overpowered and complex for simple TNG editing);
SciTE (I never could figure out how to make this work, but it could be useful with SciTE);
NotePad2 (I approve it!);
Crimson Editor (morerunes approves it!);
EditPad Lite (OldBoy approves it!);
NotePad++ (never used it); And for those who like text editing the TNGs, maybe I can turn you onto using the TNG Parser, a good tool to quickly navigate and edit the TNG text. Lesson 4 - Understanding ScriptsThere are a few core things to every TNG script. They are universal and will apply to anything you want to add.
NewThing [Type of TNG script];
Player [Player Type];
UID 00000000000000000000;
DefinitionType "[game.bin entry symbol name]";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
Health 1.0;
EndThing;
Type of TNG script:
Simple and nearly completely self-explanatory.
AICreature
Building
Holy Site
Marker
Object
Switch
Thing
TrackNode
Village
In this series of lessons, I'll only be using Object and Marker types.
Player Type:
-1 - Marker-exclusive. We won't be using these..
0 - Special creatures and track nodes. We won't be using these.
2 - Special creatures. We won't be using these.
3 - Special creatures. We won't be using these.
4 - Everything else. Every script we make will be Player 4.
UID:
The UID can, in theory, be any number. I typically use the standard twenty-digit numbers between 10000000000000000000 and 18446744073709551615.
What's important about these is that it has to be unique for each script, unique to the region, and preferably unique to the game. It's acts as that script's signature.
DefinitionType:
[game.bin entry symbol name]
This determines what thing will be loaded. The name will be as it is in FableExplorer, BUILDING, CREATURE, HOLY_SITE, MARKER, OBJECT, SWITCH, THING, VILLAGE entries. We will only be touching OBJECT and MARKER entries though. Which ones, I'll specify later.
ScriptName:
Doesn't matter for my lesson. Keep it at NULL.
ScriptData:
Doesn't matter for my lesson. Keep it at "NULL".
ThingGamePersistent:
Doesn't matter for my lesson. Keep it at FALSE.
ThingLevelPersistent:
Doesn't matter for my lesson. Keep it at FALSE.
Health:
Doesn't matter for my lesson. Keep it at 1.0.
The whole script is enveloped. NewThing, EndThing. This tells Fable when a script starts and when it ends.
Each line ends with a ;, a semicolon. This tells Fable that it's the end of the line.
Things surrounded in quotes need to be kept in quotes.
Syntax is very important, and Fable will crash if the slightest thing is wrong. Lesson 5 - Understanding CTC Scripts and common CTC ScriptsWith that done, there are CTC scripts that need to be added to the core script. These will determine how the thing will behave in Fable.
Chests will have a CTCChest.
Barrels will have a CTCContainerRewardHero.
Digging spots will have a CTCDiggingSpot.
Barrels that explode will also have a CTCExplodingObject.
Fishing spots will have a CTCFishingSpot.
Bookcases and the like will have a CTCSearchableContainer.
Everything will have a CTCPhysicsStandard and a CTCEditor.
Most things will have a CTCTargeted.
Each type-specific thing will be explained in the relevant sections. The CTCPhysicsStandard will be explained first, since it goes with everything.
StartCTCPhysicsStandard;
PositionX 0.0;
PositionY 0.0;
PositionZ 0.0;
RHSetForwardX 0.0;
RHSetForwardY 0.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 0.0;
EndCTCPhysicsStandard;
RHSetForward and RHSetUp determine pitch and yaw (rotations). I was going to explain these in detail, but I tried to simplify it and decided to just provide a link to some learning material instead. Here. Use AlbionExplorer for easy editing of the RHSetForward values or ChocolateBox for easy editing of the RHSetForward and RHSetUpZ values.
Position XYZ is easy though. They're translational values, meaning they determine where on the map the thing goes. X is X, Y is Y, and Z is Z. Unlike RHSets, editing one value doesn't mean you have to edit other values. Read. Unlike in charts though, there will be no negative values because the origin (0,0,0) of the map is in the south west corner above Z0. The Z may very well be irrelevant. I've spawned chests before that were too low, and they floated to the surface of the map. I've spawned chests that were too high, and they fell down to the ground. But anyway...
The important part of this. The Westernmost part of the map is X0. The Southernmost part of the map is Y0. The lowest altitude of the map will vary, but technically it's Z0. The higher the X, the farther east it goes. The higher the Y, the farther north. The higher the Z, the farther up.
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
This one is very, very simple. Things that will be targeted, or highlighted when the Hero is focusing on it, will have this and it will be set to true. That's all there is to know about this one.
StartCTCEditor;
EndCTCEditor;
Equally simple. Everything will have this. You may even be able to leave it out, but I gerenally don't do such things as a part of good practices.
Next will be a series of specific scripts. Lesson 6 - ChestsLet's take a look at a template chest script. Script TemplateNewThing Object;
Player 4;
UID 10000000000000000000;
DefinitionType "[Chest type]";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 0.0;
PositionY 0.0;
PositionZ 0.0;
RHSetForwardX 0.0;
RHSetForwardY 1.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCChest;
ContainerContents[0] "[OBJECT entry name]";
ChestOpen FALSE;
EndCTCChest;
Health 1.0;
EndThing;
The first thing you should notice is the new CTC Script. Chests have CTCChest. These and the rest to be used in my lesson plan are all very easy to understand and use.
StartCTCChest;
ContainerContents[0] "[OBJECT entry name]";
ChestOpen FALSE;
EndCTCChest;
Each ContainerContents line will have a [#] after it, no space in between. For each line, the number goes up by one. If I wanted a chest with ten items in it, it will look like this:
ContainerContents[0] "OBJECT_SOMETHING_OR_OTHER";
ContainerContents[1] "OBJECT_SOMETHING_OR_OTHER";
ContainerContents[2] "OBJECT_SOMETHING_OR_OTHER";
ContainerContents[3] "OBJECT_SOMETHING_OR_OTHER";
ContainerContents[4] "OBJECT_SOMETHING_OR_OTHER";
ContainerContents[5] "OBJECT_SOMETHING_OR_OTHER";
ContainerContents[6] "OBJECT_SOMETHING_OR_OTHER";
ContainerContents[7] "OBJECT_SOMETHING_OR_OTHER";
ContainerContents[8] "OBJECT_SOMETHING_OR_OTHER";
ContainerContents[9] "OBJECT_SOMETHING_OR_OTHER";
Space after the [#], the spawned object in quotes, each line ending with a semicolon. This is part of the syntax mentioned earlier. You can have an unlimited number of items in a chest.
The value for ChestOpen should always be FALSE. You don't want to spawn a chest that you can't use. When saving the game, this gets saved and is flipped to true when you open it (in the gamesave, not the TNG).
The DefinitionType will determine what type of chest it's going to be. I've provided a list of chests you can use, so that you don't have to get it yourself. Some of these need explaining, so here I'll also describe them.
OBJECT_CHEST_OPENABLE
The standard chest used in Fable.
OBJECT_NW_CHEST_OPENABLE
The Northern Wastes chest.
OBJECT_SILVERKEY_CHEST_5
Silver key chest, 5 keys.
OBJECT_SILVERKEY_CHEST_10
Silver key chest, 10 keys.
OBJECT_SILVERKEY_CHEST_25
Silver key chest, 15 keys.
OBJECT_SILVERKEY_CHEST_50
Silver key chest, 20 keys.
OBJECT_SILVERKEY_CHEST_75
Silver key chest, 25 keys.
OBJECT_SILVERKEY_CHEST_100
Silver key chest, 30 keys.
OBJECT_SARCOPHAGUS_01
These are actually chests. They're found in the cemetery.
OBJECT_SARCOPHAGUS_02
These are actually chests. They're found in the cemetery.
OBJECT_SARCOPHAGUS_KING_01
These are actually chests. They're found in the cemetery.
OBJECT_NW_SARCOPHAGUS_01
These are actually chests. This one is found in the Northern Wastes.
Finished chest scriptNewThing Object;
Player 4;
UID 16157916872910000001;
DefinitionType "OBJECT_SARCOPHAGUS_KING_01";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent TRUE;
ThingLevelPersistent TRUE;
StartCTCPhysicsStandard;
PositionX 65.0;
PositionY 29.0;
PositionZ 40.0;
RHSetForwardX 0.0;
RHSetForwardY -1.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCChest;
ContainerContents[0] "OBJECT_FISHING_ROD_UPGRADED";
ContainerContents[1] "OBJECT_SPADE";
ChestOpen FALSE;
EndCTCChest;
Health 1.0;
EndThing; Lesson 7 - BarrelsBasic script: Script TemplateNewThing Object;
Player 4;
UID 00000000000000000000;
DefinitionType "[Barrel type]";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 0.0;
PositionY 0.0;
PositionZ 0.0;
RHSetForwardX 0.0;
RHSetForwardY 0.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 0.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCContainerRewardHero;
ContainerContents[#] "[OBJECT entry name]";
EndCTCContainerRewardHero;
Health 1.0;
EndThing; Barrel types:
OBJECT_BARREL_BREAKABLE
OBJECT_SS_BARREL_BREAKABLE_01
The only new thing here that's important is the CTCContainerRewardHero. The only difference between this and the chest is that there's no BarrelOpen line, and items in barrels are given to the Hero once he picks them up. When the barrel breaks, the items will scatter about on the floor. Be careful not to have too many items, though, as too many items will cause lag and, if way too many, will freeze Fable.
There's also exploding barrels. There is more to this one. Script TemplateNewThing Object;
Player 4;
UID 00000000000000000000;
DefinitionType "OBJECT_BARREL_EXPLODING";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 0.0;
PositionY 0.0;
PositionZ 0.0;
RHSetForwardX 0.0;
RHSetForwardY 0.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 0.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCContainerRewardHero;
ContainerContents[#] "[OBJECT entry name]";
EndCTCContainerRewardHero;
StartCTCExplodingObject;
MaxDamage 0.0;
Radius 0.0;
FireDamage 0;
TriggeredOnCreatureProximity FALSE;
TriggerRadius 0.0;
EndCTCExplodingObject;
Health 1.0;
EndThing; StartCTCExplodingObject;
MaxDamage 0.0;
Radius 0.0;
FireDamage 0;
TriggeredOnCreatureProximity FALSE;
TriggerRadius 0.0;
EndCTCExplodingObject;
All of these are pretty self-explanatory, but just in case:
MaxDamage is the maximum amount of damage done by the explosion.
Radius is how far the damage will be distributed.
FireDamage is elemental damage that hurts creatures weak to fire more.
TriggeredOnCreatureProximity determines whether or not it detonates when something approaches it. Set it to TRUE to have it explode when something is near it.
TriggerRadius determines how close something has to be to trigger the explosion. Finished barrel scriptsNewThing Object;
Player 4;
UID 16157916872910000002;
DefinitionType "OBJECT_SS_BARREL_BREAKABLE_01";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent TRUE;
ThingLevelPersistent TRUE;
StartCTCPhysicsStandard;
PositionX 60.0;
PositionY 28.0;
PositionZ 40.0;
RHSetForwardX 0.0;
RHSetForwardY 1.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCContainerRewardHero;
ContainerContents[0] "OBJECT_ADRENALINE_POTION";
EndCTCContainerRewardHero;
Health 1.0;
EndThing;
NewThing Object;
Player 4;
UID 16157916872910000003;
DefinitionType "OBJECT_BARREL_EXPLODING";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent TRUE;
ThingLevelPersistent TRUE;
StartCTCPhysicsStandard;
PositionX 61.0;
PositionY 27.0;
PositionZ 40.0;
RHSetForwardX 0.0;
RHSetForwardY 1.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCContainerRewardHero;
ContainerContents[0] "OBJECT_ADRENALINE_POTION";
EndCTCContainerRewardHero;
StartCTCExplodingObject;
MaxDamage 5.0;
Radius 5.0;
FireDamage 7;
TriggeredOnCreatureProximity TRUE;
TriggerRadius 3.0;
EndCTCExplodingObject;
Health 1.0;
EndThing; Lesson 8 - Searchable containersBasic script: Script TemplateNewThing Object;
Player 4;
UID 00000000000000000000;
DefinitionType "[Searchable container type]";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 0.0;
PositionY 0.0;
PositionZ 0.0;
RHSetForwardX 0.0;
RHSetForwardY 0.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 0.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCSearchableContainer;
ContainerContents[#] "[OBJECT entry name]";
NumberOfTimesToSearch 0;
EndCTCSearchableContainer;
Health 1.0;
EndThing; Just like before, the only important thing here is the new CTC script.
StartCTCSearchableContainer;
ContainerContents[#] "[OBJECT entry name]";
NumberOfTimesToSearch 0;
EndCTCSearchableContainer;
You're already familiar with the ContainerContents lines.
NumberOfTimesToSearch should always be 0.
Searchable container types:
OBJECT_BOOKSHELF_01
OBJECT_BOOKSHELF_02
OBJECT_BS_MAYORESS_BED
OBJECT_CUPBOARD_MEDIUM
OBJECT_CUPBOARD_TALL
OBJECT_CUPBOARD_TALL_SPLIT
OBJECT_GUILD_BOOKCASE_SELECT
OBJECT_GUILD_BOOKCASE_SELECT_LARGE
OBJECT_GUILD_BOOKCASE_SELECT_LARGE_DD
OBJECT_GUILD_BOOKCASE_SELECT_MEDIUM
OBJECT_HAUNTED_HOUSE_BOOKSHELF_01
OBJECT_HAUNTED_HOUSE_BOOKSHELF_02
OBJECT_HAUNTED_HOUSE_CUPBOARD_01
OBJECT_HAUNTED_HOUSE_CUPBOARD_02
OBJECT_HAUNTED_HOUSE_GRANDFATHER_CLOCK
OBJECT_HKC_CUPBOARD_MEDIUM_01
OBJECT_HKC_CUPBOARD_TALL_01
OBJECT_HKC_CUPBOARD_TALL_02
OBJECT_KHG_CUPBOARD_01
OBJECT_KHG_CUPBOARD_02
OBJECT_KHG_CUPBOARD_SMALL_01
OBJECT_KHG_CUPBOARD_SMALL_02
OBJECT_PRISON_WARDER_OFFICE_BOOKSHELF_01
OBJECT_SCARECROW_HAPPY
OBJECT_SCARECROW_HAPPY_WITH_HAT
OBJECT_SCARECROW_SCARY
OBJECT_SS_BOOKCASE_01
OBJECT_SS_BOOKCASE_02
OBJECT_SS_CUPBOARD_MEDIUM_01
OBJECT_SS_CUPBOARD_TALL_01
OBJECT_SS_CUPBOARD_TALL_SPLIT_01 Finished searchable container scriptNewThing Object;
Player 4;
UID 16157916872910000004;
DefinitionType "OBJECT_HAUNTED_HOUSE_GRANDFATHER_CLOCK";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent TRUE;
ThingLevelPersistent TRUE;
StartCTCPhysicsStandard;
PositionX 63.0;
PositionY 25.0;
PositionZ 40.0;
RHSetForwardX 0.0;
RHSetForwardY 1.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCSearchableContainer;
ContainerContents[0] "OBJECT_ADRENALINE_POTION";
NumberOfTimesToSearch 0;
EndCTCSearchableContainer;
Health 1.0;
EndThing; Lesson 9 - Digging spotsBasic script: Script TemplateNewThing Marker;
Player 4;
UID 00000000000000000000;
DefinitionType "MARKER_DIGGING_SPOT";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 0.0;
PositionY 0.0;
PositionZ 0.0;
RHSetForwardX 0.0;
RHSetForwardY 0.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 0.0;
EndCTCPhysicsStandard;
StartCTCEditor;
EndCTCEditor;
StartCTCContainerRewardHero;
ContainerContents[#] "[OBJECT entry name]";
EndCTCContainerRewardHero;
StartCTCDiggingSpot;
Hidden FALSE;
EndCTCDiggingSpot;
Health 0.0;
EndThing; First, instead of NewThing Object, it's NewThing Marker. That's a given. The CTCContainerRewardHero scripting is just like the one used with barrels, so I won't go into that one here.
The CTCDiggingSpot determines with just one line, Hidden [TRUE/FALSE];, whether or not the Hero will be able to tell if there's a digging spot there. The little context hud spade icon will show up when you're over it if it isn't hidden. Finished digging spot scriptNewThing Marker;
Player 4;
UID 16157916872910000005;
DefinitionType "MARKER_DIGGING_SPOT";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent TRUE;
ThingLevelPersistent TRUE;
StartCTCPhysicsStandard;
PositionX 61.0;
PositionY 36.0;
PositionZ 40.0;
RHSetForwardX 0.0;
RHSetForwardY 1.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCContainerRewardHero;
ContainerContents[0] "OBJECT_ADRENALINE_POTION";
EndCTCContainerRewardHero;
StartCTCDiggingSpot;
Hidden FALSE;
EndCTCDiggingSpot;
Health 1.0;
EndThing; Lesson 10 - Fishing spotsBasic script: Script TemplateNewThing Marker;
Player 4;
UID 00000000000000000000;
DefinitionType "MARKER_FISHING_SPOT";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 0.0;
PositionY 0.0;
PositionZ 0.0;
RHSetForwardX 0.0;
RHSetForwardY 0.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 0.0;
EndCTCPhysicsStandard;
StartCTCEditor;
EndCTCEditor;
StartCTCContainerRewardHero;
ContainerContents[#] "[OBJECT entry name]";
EndCTCContainerRewardHero;
StartCTCFishingSpot;
EndCTCFishingSpot;
Health 0.0;
EndThing; This is exactly like the digging spot, except the CTCFishingSpot has nothing in it. Doesn't get any easier than that. Finished fishing spot scriptNewThing Marker;
Player 4;
UID 16157916872910000006;
DefinitionType "MARKER_FISHING_SPOT";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent TRUE;
ThingLevelPersistent TRUE;
StartCTCPhysicsStandard;
PositionX 41.0;
PositionY 41.0;
PositionZ 39.0;
RHSetForwardX 0.0;
RHSetForwardY 1.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCContainerRewardHero;
ContainerContents[0] "OBJECT_ADRENALINE_POTION";
EndCTCContainerRewardHero;
StartCTCFishingSpot;
EndCTCFishingSpot;
Health 1.0;
EndThing; Lesson 11 - Objects, straight upIf you don't mind getting items one at a time, there are a few cool things you can do, aside from spawn the item without leaving behind a chest or container. Script TemplateNewThing Object;
Player 4;
UID 00000000000000000000;
DefinitionType "[OBJECT entry name (has CInventoryItemDef)]";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent FALSE;
ThingLevelPersistent FALSE;
StartCTCPhysicsStandard;
PositionX 0.0;
PositionY 0.0;
PositionZ 0.0;
RHSetForwardX 0.0;
RHSetForwardY 0.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 0.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
Health 1.0;
EndThing; If you want the item to only show up until you pick it up, change ThingGamePersistent and ThingLevelPersistent to TRUE. This way, you pick it up, you have it, it doesn't spawn again.
That's all you need for inventory items. But let's say you want a weapon. With weapons, you can add a fun script.
StartCTCObjectAugmentations;
SavedInGame TRUE;
AugmentationDefNames[0] "[Augment item]";
EndCTCObjectAugmentations;
Leave SavedInGame at TRUE.
The AugmentationDefNames syntax is pretty much exactly the same the ContainerContents lines in all the previous scripts.
Augment items:
OBJECT_SHARPENING_AUGMENTATION
OBJECT_PIERCING_AUGMENTATION
OBJECT_SILVER_AUGMENTATION
OBJECT_FLAME_AUGMENTATION
OBJECT_HOBBE_KILLER_AUGMENTATION
OBJECT_LIGHTNING_AUGMENTATION
OBJECT_EXPERIENCE_AUGMENTATION
OBJECT_HEALTH_AUGMENTATION
OBJECT_MANA_AUGMENTATION
OBJECT_BANDIT_SLAYER_AUGMENTATION Finished Object scriptNewThing Object;
Player 4;
UID 16157916872910000007;
DefinitionType "OBJECT_LEGENDARY_LONGSWORD";
ScriptName NULL;
ScriptData "NULL";
ThingGamePersistent TRUE;
ThingLevelPersistent TRUE;
StartCTCPhysicsStandard;
PositionX 63.0;
PositionY 29.0;
PositionZ 40.0;
RHSetForwardX 0.0;
RHSetForwardY 1.0;
RHSetForwardZ 0.0;
RHSetUpX 0.0;
RHSetUpY 0.0;
RHSetUpZ 1.0;
EndCTCPhysicsStandard;
StartCTCTargeted;
Targetable TRUE;
EndCTCTargeted;
StartCTCEditor;
EndCTCEditor;
StartCTCObjectAugmentations;
SavedInGame TRUE;
AugmentationDefNames[0] "OBJECT_HEALTH_AUGMENTATION";
AugmentationDefNames[1] "OBJECT_MANA_AUGMENTATION";
AugmentationDefNames[2] "OBJECT_EXPERIENCE_AUGMENTATION";
EndCTCObjectAugmentations;
Health 1.0;
EndThing; And that concludes my lessons for this thread. Congratulations, you are a master item spawner. Wait, you're having problems?Check over your script, make sure that the syntax isn't wrong. Make sure you've included the needed pieces of the scripts. If you can't figure it out, post your script here and tell us which TNG you used for the edit. I've attached my finished scripts. They all take place in Orchard Farm. You can see them, use them as an example.
The objects are all in the warehouse. The digging spot is just outside the warehouse. The fishing spot is in the little pond near the warehouse. The digging/fishing spots are marked with signs for your convenience.
Hope you've enjoyed JohnDoe's Item Spawning 101. If not, sod off.
[Updated on: Fri, 04 June 2010 04:29] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Sat Dec 28 20:05:52 PST 2024
Total time taken to generate the page: 0.12662 seconds
|