[WIPz/Beta] Randomized Skillbooks

Post » Fri Feb 18, 2011 11:04 pm

Randomized Skillbooks
v1.00 release

http://www.fallout3nexus.com/downloads/file.php?id=14173

Inspired originally by BigMill's Random Bobblehead mod and a comment by SteveDog on the gamesas forums, this is something that I've been wanting to do for a long time. It changes all manually-placed skillbooks in the wasteland from "always there" to "maybe there, maybe not". No more running to a specific spot to find skillbox X, Y and Z right out of Vault 101. Now you're going to have to work for it, and maybe offer up a prayer to the RNG gods.

Randomizes whether placed skillbooks in the default Fallout 3 game will appear depending on the player's Luck stat. The goal is that a player with average (Luck 5) will see about 20 books of a particular type on average if they visit every possible spawn point. Players with a low Luck value will see about 17, while players with a very high Luck will see around 23. Each book's appearance or non-appearance is chosen when the player visits the location for the first time (or gets in the general area for outdoor locations). You will no longer know for sure where you will find a given book. (Much like BigMill's "Random Bobblehead" mod, which was a great inspiration.)

In the base Fallout 3 world there are approximately 22-24 copies of the 13 skillbooks. Not all of these are accessible to the player, so most players will only manage to find 21-22 due to bugs in the base game. Additional spawn points for all books have been added so that it less likely that a book will appear at a given location.

After installing this mod there will be about 60 copies of the 13 book types. That means for a player with Luck of 5, they have a 33% chance that a book will appear at a spawn point. With Luck of 10, they will have a 40% chance. Some players might eventually see only 10 copies of a particular book while seeing 30 copies of another type, but the distribution should be close to the targeted number.

Random Details:

The "how did I do this" is actually pretty simple in practice. In the vanilla game, none of the skillbooks have an attached script. So I simply attached new scripts to the base book IDs, added a few global constants, and now when the book first appears in the 3D cell it decides whether to leave itself alone or it disables itself and marks itself for removal. (Using the OnLoad block.) For 99.5% of the books out there, this is all that was needed.

The second part of the puzzle, and the much more demanding and time-consuming part, was to add more book spawn points to as many of the game locations as possible so that I could turn down the chance-to-appear percentage. I decided to stop when I had 60 of each book placed in the world (including the original 22-24 spawns). That gave me a base chance of 25% that a book will appear, and each point of Luck gives an additional 1.5% chance. I may eventually decide to add more spawn points (75 would be a nice number), but only if things work well with the beta release.
User avatar
Liii BLATES
 
Posts: 3423
Joined: Tue Aug 22, 2006 10:41 am

Post » Fri Feb 18, 2011 10:46 pm

Exactly what I have been waiting for :foodndrink:
User avatar
Gemma Flanagan
 
Posts: 3432
Joined: Sun Aug 13, 2006 6:34 pm

Post » Sat Feb 19, 2011 12:40 am

:celebration: I'm an inspiration!!

I'll definitely check this out. :tops:
User avatar
Jose ordaz
 
Posts: 3552
Joined: Mon Aug 27, 2007 10:14 pm

Post » Fri Feb 18, 2011 9:58 pm

Yes, thank you. I'll be sure to add this to my game. Now all I need is for SteveDog to finish up with the random weapon components.
User avatar
Roisan Sweeney
 
Posts: 3462
Joined: Sun Aug 13, 2006 8:28 pm

Post » Sat Feb 19, 2011 8:55 am

:D

I don't know whether you'll be able to fold it into Savage Wasteland or not. I looked at how you did SW, then went a slightly different way. I chose not to create 2nd copies of all the object definitions, for instance.

My plan right now is to play-test it this week and next, see if I get any bug reports, then upgrade it to a full release instead of a beta-test. I need to double-check things like the quest books, books that spawn inside containers. I've already tested the Vault 101 birthday gift, and that seems to work fine. There are a few books that simply aren't movable with the "Z" key, but they can easily be picked up and they don't vanish into the terrain or other models. So books like that, I'm not going to fix. Books that fall into terrain, OTOH, are something that I'll be looking closely for.

It was both tedious and fun to add all the book spawns. Like hiding eggs for the Easter Egg hunt. My hiding places are nowhere near as bad as Bethesda's. The devs hid some books under milk crates or under other objects, and some of those existing spawns I had never found. I tended to put my books on counters, desks, tables, inside milk crates, on top of metal boxes or footlockers, at the base of beds (in the case of Grognak). Only a few ended up in weird places like behind something else or under something as I tried to stay away from that. My hope is that, if you're actually *looking* around and not just running through, they should be fairly easy to spot. Unless they are blending in with the floor color or are mixed in with a bunch of abandoned books. Science books ended up in science places, lockpick books in the areas where shadier characters live, repair books near broken electronics, energy weapons in energy-like places, etc. Some placement was based on the book's name, some places were picked due to the skill that is trained. Naturally, there are numerous speech books in the ruins of the capitol building now. :P

Taking the "educated" perk might not be so over-the-top once you have this mod installed... it will hopefully feel like more of a "huzzah!" moment when you find a skillbook then before.
User avatar
Iain Lamb
 
Posts: 3453
Joined: Sat May 19, 2007 4:47 am

Post » Sat Feb 19, 2011 10:04 am

I used “dummy” items to retain compatibility with mods that attach scripts to the real items. As you said, there are no other mods that attach scripts to skill books, and why would there be, so you won’t have an issue with compatibility. This also means that, in theory, when finished your mod can be used in conjunction with mine. Yes they both affect skill books, but by taking different approaches they should work together. That would be for the really hardcoe survivalist types.
User avatar
Lauren Denman
 
Posts: 3382
Joined: Fri Jun 16, 2006 10:29 am

Post » Sat Feb 19, 2011 2:58 am

Well, after starting a new character in Megaton... I'm definitely going to move at least a dozen of those book spawns out of Megaton. Even before disarming the bomb, I managed to scraqe up 8 or 9 different books (with a Luck of 8, which gave me a 37% chance) in the non-locked areas.

The system is working fine, I just think there are too many spawn points in Megaton. :)
User avatar
Ben sutton
 
Posts: 3427
Joined: Sun Jun 10, 2007 4:01 am

Post » Fri Feb 18, 2011 9:32 pm

Awesome! This makes me want to resume that long and tedious mod idea I had where different locations would have different occupants that would change randomly ever week or so. Along with the occupants the decor and loot would have to change too, and making one thing on top of another in the GECK is sometimes tricky lol. Anyways, thanks for the sweet mod. :)
User avatar
Krystal Wilson
 
Posts: 3450
Joined: Wed Jan 17, 2007 9:40 am

Post » Fri Feb 18, 2011 7:20 pm

One thing that I'm now thinking about is whether I can combine the concepts from "Deadlier Explosive Traps" and "Randomized Skillbooks".

I may create an optional ESP for "Deadlier Explosive Traps" that adds new mines / baby carriages to the world, but with only a 33% chance that they will appear. Or bear traps. Maybe some other types of traps. I wouldn't attach to the default trap IDs, but would create a new ID that does the same thing. Probably something that I'll save for NV, perhaps.
User avatar
Nims
 
Posts: 3352
Joined: Thu Jun 07, 2007 3:29 pm

Post » Sat Feb 19, 2011 6:15 am

I had experimented with a similar concept. The idea was to replace the mines (active) in the game with XMarkers, then when the cell loads a script generates a few random numbers, one for distance and one for direction, and places an active mine at a random location within a certain radius of the original spot. Because the XMarkers remain after the mine is disarmed and taken by the player they can be set to respawn the mine when the cell respawns. The biggest issue I had was trying to keep the mine from spawning inside a wall or under the floor.
User avatar
lauraa
 
Posts: 3362
Joined: Tue Aug 22, 2006 2:20 pm

Post » Fri Feb 18, 2011 10:30 pm

I suspect the only method for using a XMarker would be the brute force method. Place a bunch of mines by hand, then jot down the XYZ coordinates, then delete them back out. Now you can have the XMarker do the placement at some of those locations during cell reset. Way back when I was working on my Tuchola Forest map for CoD:UO, I did something similar for generating random sound effects of snow falling off of tree branches.

I probably wouldn't want to do big massive minefields with this. More of placing no more then half a dozen mines in a particular location and then only having one or two of them show up. Situations where you've been down a specific corridor a few times in prior plays, but in this play there's a trap / mine. Everyone knows where the baby carriage is in the hospital, for instance. Or where all the trip-wires are in the hotel. Some people might even know where all the mines are in Minefield. This might make the wasteland a more deadly place on repeat playthroughs.

If OnLoad() scales, and disable/markfordelete doesn't seem to cause issues in the long run, I may consider this. I can already think of half a dozen places where I could add new tripwire traps, mines, etc.
User avatar
KU Fint
 
Posts: 3402
Joined: Mon Dec 04, 2006 4:00 pm

Post » Fri Feb 18, 2011 10:40 pm

So I've been trying out this mod and really liking it so far. It's great not knowing where all the skill books are and just coming across them in my travels. The only issue I've seen so far is with Hamilton's Hideaway. I found the usual Duck & Cover there and almost right next to it was a copy of the Chinese Special Ops. I think that's a bit too much for one minor area. Personally I think you shouldn't worry about finding appropriate locations for the various book types. Just create a spawn point and let whatever type of book that shows up be completely random. I wouldn't worry too much about the number of spawn points in Megaton either. So what if once in awhile you get lucky. The most I've found there so far is 3 books, which isn't all that bad really.
User avatar
jennie xhx
 
Posts: 3429
Joined: Wed Jun 21, 2006 10:28 am

Post » Sat Feb 19, 2011 8:19 am

I used “dummy” items to retain compatibility with mods that attach scripts to the real items. As you said, there are no other mods that attach scripts to skill books, and why would there be, so you won’t have an issue with compatibility. This also means that, in theory, when finished your mod can be used in conjunction with mine. Yes they both affect skill books, but by taking different approaches they should work together. That would be for the really hardcoe survivalist types.


FWE and the Book Perks mod both attach scripts to the vanilla books. I'm not 100% positive (don't have the file accessible ATM), but I'm fairly certain they do, been a while since I looked at the Books Stuff.

That said, you might be able to retain compatibility by combining the scripts in an FWE override version. The only other method that comes to mind is either replacing the base object (ala Savage Wasteland) or implementing a stripped down version of FWE's take on unfound loot, which could use a cell walking script to check for placed books and dynamically remove them.

Cool mod though, this will be nice!
User avatar
clelia vega
 
Posts: 3433
Joined: Wed Mar 21, 2007 6:04 pm


Return to Fallout 3