Jump to content

Wisp

Modders
  • Posts

    1,185
  • Joined

  • Last visited

Posts posted by Wisp

  1. I'm currently playing the first Baldur's Gate via BGT and I am REALLY enjoying this so far. One suggestion for your next version would be Class Specific randomization For example it was very odd to find a Long sword and an Axe on Bassilus after killing him. He should have had a class specific weapons (such as a hammer). Also I don't know how NPC's work, but don't they also have proficiency with certain weapons? Would be nice if the randomizer gave them proficiency specific weapons.

     

    Maybe it was plunder? It is not like Bassilus has ample opportunity to trade in his loot.

     

    I'll see if I can up with something, but there are certain problems.

    For one, there is no guarantee there would be a suitable item available. Maybe the tier simply does not include any, or maybe the ones there were have already been randomised. This is the case with Bassilus. He need not get a random weapon, but there simply are no other weapons he can use in that tier.

     

    As for NPCs in general, I think the mod currently tries to make the best possible use of existing proficiencies and weapons. But I may add, or may already have added, a "cheat" to alter proficiencies to suit the weapon (legal combinations only, of course).

  2. The archive may be in a version of RAR your software can't handle (there have been revisions and new versions released over the years). Assuming you can't upgrade your software to more recent versions, you can probably use the linux distribution. The only differences between the latter and the OSX version is the command file, the WeiDU binary and the autoinstall tp2 file, and the former two are not difficult to obtain elsewhere.

  3. In a way removing locations is very simple; you just delete a line in the appropriate location list and you are done. However, for the uninitiated there may be a stumbling block or two. There is also one caveat.

     

    First off, the locations used by Item Randomiser are controlled by location lists. There are 4 location lists:

    • lists/locations/base/bg1.2da - Main location list for BG1.
    • lists/locations/mode2/bg1.2da - Extension list used by Mode 2 for BG1.
    • lists/locations/base/bg2.2da - Main location list for BG2.
    • lists/locations/mode2/bg2.2da - Extension list used by Mode 2 for BG2.
    You can find out which list and tier a particular location belongs to by consulting the spoilers document. To proceed you need to know which line to delete. However, this may be a little more tricky. There is unfortunately no good, general way to find out what I chose to call a particular location.

     

    For some locations there may be a helpful comment. For locations that have an ident you may be able to figure it out by knowing which item you normally find there and cross-referencing with the item list. You may also be able to deduce it from the area or the Target file name. If all else fails you can always ask.

     

    Anyway, once you have the line, you remove the location by deleting the line. When you then install the mod no items will be placed at that location (note that a location may be present multiple times in the same list).

     

    If you remove a location with an identifier (something other than "x" in the Ident column), the corresponding item will also also be excluded (that is, it will not be randomised and you will find it at its original location; the one you just removed).

     

    160110: Edited for the new directory structure and the new way the location lists interact with the item lists.

  4. Adding an item to the pool of items to be randomised is generally not difficult. However, there are a few caveats:

    • Item Randomiser has two kinds of items lists: a main list and an extension list. The latter is used exclusively by Mode 2, but the main list is used by both Mode 1 and Mode 2. When you add an item you can choose to have the item taken from somewhere else or to have the item simply be added. The main list can only take items from area, creature and store files (there are two exceptions, but that's just what they are: exceptions). If the items needs to be taken from somewhere else it needs to go in the extension list.
    • Beware of "scripted" items. These items are the ones that are tied into the game in a more complex manner than usual, usually through one or more scripts. Examples include the Dragonslayer sword and the Dragon Scale Shield at Firkraag's or the Constitution tome in BG1. Randomising "scripted" items is outside the scope of this tutorial.
    • Some tiers have "special" locations. These locations are handled by specialised tp2 code and behave differently depending on what item is randomised there. Examples include the Machine of Lum the Mad or Jermien at Umar Hills. Both these locations tailor the reward text after what item is given as the reward. There is always a fall-back option to cover unhandled items (that is, you don't have to do anything) but it is something to be aware of.
    • Some items have interactions with other mods and that can result in complications. E.g., Jasper from Dungeon-Be-Gone will give you a Girdle of Bluntness regardless of whether the Girdle in the dungeon is actually there or if it's been randomised. Item Randomiser has systems for handling this, but using them is not altogether straight-forward and is outside the scope of this tutorial.

     

    There are a few things to adding items. First, you obviously need to know what item you want to add. Second, you need to decide if the item should be taken from anywhere, or simply be added. If the item should be taken, you need to know where to take it from. Third, you need to decide what tier the item should be added to, and whether it should be added to the main list or the list for Mode 2.

     

    You'll probably need Near Infinity (NI).

     

    The item

    The best way to find out what the item is called is by using NI. Start NI and select Search->CRE/ITM/SPL/STO... and select Items. Enter the name of the item (or part of it) and hit Search. You'll get a list of all items matching the entered name. You want the "item code," which is actually part of the file name. E.g., if you searched for "Gauntlets of Fumbling" you want "brac08."

     

    The source

    NI also has the ability to find references to a particular file in other files. This can be used to find the "source" file, from which our item should be taken. We can also use it to assess if it is safe to randomise our item. Open the item in NI (e.g., by finding it through a search) and switch to the Edit tab. At the bottom there's a button called "Find..." Select Find...->references to this file. Select all of ARE, BCS, CRE, DLG, EFF, SPL and STO and deselect everything else and hit Search. You will most likely come across a couple of errors, two concerning XR2400.ARE and XR2600.ARE. These are probably harmless; the two about AR2400.ARE and XR2600.ARE certainly are.

     

    When the search has completed you'll be presented with a list of files that reference our item file. If there's just a single file it's all green. That file is our "source" and it means it is safe to randomise the item. If the search result includes more than one file it gets a bit more tricky. Some items are not unique, others may be "scripted" and yet others may have something else going on.

     

    If you know where the item you are interested in is supposed to be that may be enough. E.g., if you want to randomise the Girdle of Bluntness from Irenicus' Dungeon, you can ignore the references in ppumb01.sto and temtalos.sto because those are both stores and refer to other instances of the girdle. Areas starting with "XR" is cruft left over from when Bioware was making and testing the game and are to be ignored. All real areas start with "AR" is BG2, BGT and BG1 (they start with "FW" in Tutu). Hence AR0603.ARE is our "source" file.

     

    If the search result includes .BCS, .DLG, .EFF or .SPL files and the item itself is not awarded by a script or a dialogue, the item is most likely "scripted" and cannot be safely randomised without additional work (outside the scope of this tutorial). However, there are a few exceptions. E.g., the Helm of Balduran in BG1 is referenced by one area file and one dialogue file, but the dialogue file is unrelated to how the helm is found (the scene with Degrodel will play out the same regardless of how and where you acquired the helm). Consequently the helm can be safely randomised if you are so inclined. If you are in doubt about whether the item is safe or not you can always ask.

     

    Adding the item

    So you know what the item is called and you know where it should be taken from (if applicable). The next step is constructing the appropriate line and adding it to the right item list.

     

    Open the item list in a text editor (e.g., Notepad but not MS Word). The line you want to add should follow the same format as the rest of them. You can find more details in the appropriate section.

     

    It does not matter much where you add your line. You can add at the end of the file, or somewhere in the middle or wherever you prefer. All lines of 6 or more columns are considered. The order of the lines does not matter.

     

    When you are done, save the file and (re)install the mod.

  5. Keeping an item from being randomised is fairly easy. You do this by editing one or more text files before installing the mod.

     

    Refer to the section on item lists for more information on that subject.

     

    As an example, say we wanted to remove the Robe of Vecna from the BG2 list, so it'd show up in its usual place in Deirdre's shop. To do that we first need to know what the item file is called. As of version 5, this information is included in the spoilers document. Secondly, we need to know which list to edit. This information can also be obtained from the spoilers document.

     

    In our example, the Robe of Vecna is wa2robe and since it's a BG2 item that isn't exclusively randomised by Mode 2 we know the list is itemlist.2da. Next, we open the list file in a plain-text editor (e.g. Notepad but not MS Word) and find the row where the first column holds the item we want.

     

    clck26 blank sahramb3.cre 7 02 i34 100
    wa2helm blank wmart2.sto 7 03 x 100
    wa2robe blank wmart2.sto 7 04 x 100
    wa2shiel blank wmart2.sto 7 05 x 100
    waflail blank wmart1.sto 7 06 x 100
    
    We delete the row, like so:

     

    clck26 blank sahramb3.cre 7 02 i34 100
    wa2helm blank wmart2.sto 7 03 x 100
    
    wa2shiel blank wmart2.sto 7 05 x 100
    waflail blank wmart1.sto 7 06 x 100
    
    Then we save the file. When the mod is installed the Robe of Vecna will not be randomised.

     

    160110: Edited for the Chance column.

  6. Could you add an option to randomize SoA items into ToB and viceversa and to/from the merchants?

    Yeah, that's on the list.

     

    Hey there again,

    Still enjoying your randomiser a lot, just stopping by to note another item i spotted thats not yet randomized: The Amulet of Cheetah Speed (Owned by Thelyn'ss in Sendais Enclave) is still in its old place.

    Yeah, that sounds like it'd be worth doing something about.

  7. Item lists control which items are randomised under which circumstances.

    There are 4 item lists:

    • lists/items/base/bg1.2da - Main item list for BG1.
    • lists/items/mode2/bg1.2da - Extension list used by Mode 2 for BG1.
    • lists/items/base/bg2.2da - Main item list for BG2.
    • lists/items/mode2/bg2.2da - Extension list used by Mode 2 for BG2.
    Item lists follow a 7-column format, with each row corresponding to 1 item. A column is a whitespace-separated sequence of characters. If a row is deleted from a list (or is made to contain less than 6 columns), that item will not be randomised when the mod is installed.

     

    The 7 columns are Item, Replacement, Source, Tier, Token, Ident and Chance:

     

    Item

    This column holds the filename of the item, sans the file extension (.itm). This is commonly known as the resource reference, or resref for short. A resref can never be longer than 8 characters. If the item does not exist it will not be randomised.

     

    Replacement

    If this column holds an item resref that item will replace the randomised item. The entry "blank" is the canonical value for no replacement item. If Source is a creature the replacement item must be of the same type as the randomised item.

     

    Source

    This column holds the full filename of the file the randomised item is to be taken from. The entry "blank" is the canonical value for randomising the item without removing it from anywhere. If the Source does not exist the item will not be randomised.

     

    Tier

    The tier the item belongs to.

     

    Token

    The item's token. Each token must be unique within each tier. For the main list (Mode 1) there's a soft limit of 25-30 (any more and the randomisation takes forever) and a hard limit of 36 items per tier.

     

    Ident

    The item's identifier. A case-insensitive value of exactly "x" means the item has no identifier. An identifier should be absolutely unique. The results of a duplicated identifier are currently undefined. The primary purpose of the identifier is to connect an item and a location. Locations have identifiers as well. If an item with a non-x identifier is removed from an item list the corresponding location will be skipped as well.

     

    Chance

    The item's chance of being randomised. A value of 100 means the item will always be randomised and a value of 0 means the item will never be randomised. If an item with an identifier is not randomised, the corresponding location will also be excluded.

     

    160110: Edited for new directory structure and the Chance column.

  8. Sorry for dragging my feet on this. I started on a full-on documentation project, but since that will evidently take a while I'll post the more pressing now and the rest when/if it's completed.

     

    Item Randomiser is designed to be a customisable mod. This is in part because it is easier for me that way and in part because I realised early on that there could well be a demographic that would appreciate not being locked in by my, or anyone else's, preferences. If you want to add or remove items, introduce new tiers or overhaul the location lists, it's all possible. This set of Do-It-Yourself articles will aim to guide you through the steps of customising these aspects of Item Randomiser to better suit your individual taste.

     

    You'll need a text editor, e.g. Notepad. There are also more powerful and feature-rich editors to choose from (note that, e.g., MS Word will not work, because it's not a text editor). A proper text editor would probably be a good idea, if only because Notepad is too dense to understand any line breaks but CRLF.

     

    I would also recommend some file-comparison utility, e.g. if you want an easy time importing your changes into a new version of Item Randomiser. There are a number of good, free file-comparison programs available, both with graphical and command-line interface. For more information on specific file-comparison programs I'll refer you to this Wikipedia page.

     

    Questions, comments, etc. go here.

     

    Index:

    1. Documentation of the item-list format
    2. How to keep an item from being randomised
    3. How to add items to the randomisation pool
    4. How to remove locations

  9. Ideally, something like the Fixpack for existing areas, whereas modders who add new areas can flag them right off the bat in the area files. And here's an advantage (for modders anyway) you may have overlooked - we can give those "unknown" bits in NI and DLTCEP useful labels (something impossible with ADD_AREA_TYPE).

    This doesn't belong in the Fixpack (and I can hear the objections already). I don't think the NI guys will include it either.

     

    Additionally, maybe half of the areas that need to be flagged are from megamods and such, and we both know they'll never be updated on account of this. An includeable resource that makes one or more new area types available would be the way to go.

     

    Personally I prefer ADD_AREA_TYPE because that way I don't feel I have to provide all the area types (the complete system). I can simply release the two area types I have and leave it at that. But if you, or someone else, provide the rest I guess I can go along with it.

     

    Well, they can talk about it here or elsewhere (not sure if this is the best forum, but cmorgan was the first to bring it up - or maybe berelinde; hard to tell from that first post). With the exception of what you said about strongholds, those other types should be fairly straightforward yes/no questions, no?

    [...]

    That is a fairly bad case if you ask me. I don't see the need for any mod incompatibilities just on account of area types.

    I can promise you it won't be that simple in practice. People are quarrelsome and don't agree. Your proposed system would be vulnerable to disagreements. If someone decided to launch a different scheme, it would pretty much be straight-off incompatible with yours, or any other static system. As such, any two mods that use different systems would be incompatible simply because they used different systems.

     

    ADD_AREA_TYPE is less vulnerable to incompatibilities. You could have different-but-same area types, you just couldn't have more than 8 new ones installed at the same time. And unlike a static system that simply assumed that bit N was type X, ADD_AREA_TYPE would fail loudly once it hit an incompatibility (a static system would result in a lot of weird, silent errors on incompatibilities).

     

    One more thought - hitherto, I think we've only been talking about areaflag.ids and the area field at 0x48. If we need new area types, can we not also add to areatype.ids and use the field at 0x14? Right now that has:
    0 NOSAVE
    1 TUTORIALAREA

    and also presumably

    2 DEADMAGICZONE
    3 DREAMAREA

    Meaning we have 28 unused flags here. Probably not as dynamic as combinable bitfields in areaflag.ids but perhaps more appropriate for something like CANT_TELEPORT?

    It's

    0x14 - areaflags.ids

    0x48 - areatype.ids

    Unlike areatype.ids, I don't think areaflags.ids is accessible from scripts.

  10. I think you may be underestimating the complications involved here. But correct me if I'm wrong.

     

    To have any meaning the area type needs to encompass a static list of areas. You will want to know where and when the area type you are using is true. Then, given different preferences and requirements and all that, I'd say it's a bit too optimistic to expect a single area type label (with an area list) to satisfy everyone. Assuming this sees use outside a handful of mods I wouldn't be surprised if we do have "duplicate" area types (e.g., two or more types for different types of inns).

     

    Then we have strongholds. You have areas that dynamically become strongholds at some point during the game. I.e., the area type needs to be added via a script (prefixes). Then we have the strongholds you can lose without losing access to the area. Since you can't unset area types you need an even more convoluted solution (more prefixes) if you want the check to be false for a stronghold you've lost.

     

    For reference, there are functional implementations of inn and stronghold types in aTweaks (atweaks/areatype/). They currently use my prefix and ADD_AREA_TYPE but changing that is trivial enough. I've been dragging my feet on the documentation, hence no publicity (which is just as well, seeing as how the discussion isn't over).

     

    If we do ditch prefixes and ADD_AREA_TYPE, who gets to decide which areas are encompassed by each area type? What happens when someone disagrees? This scheme seems to be set up for schisms and broad categories of mod incompatibilities, as any mod that uses this scheme would be automatically incompatible with a mod that used any other scheme (again, assuming more than a handful of us make use of new area types).

     

    If we use prefixes and ADD_AREA_TYPE, the worst-case scenario would be that some mod combinations are incompatible. But since ADD_AREA_TYPE is dynamic the only way to run into this incompatibility would be to install mods until the number of unclaimed area type slots was exceeded. You still get to choose which mods you want to combine.

     

    P.S. EXTRAPLANAR would not be useful to aTweaks (aTweaks needs finer granularity) but thanks for the consideration.

  11. An option to randomize joinable NPC starting locations would be really great.

    A few cannot be moved for obvious plot reasons but for most there is no real constraints on where they need to be and many

    mods both BG1NPC mod and SCS and move them already (but to non random locations).

    It would be a bit outside the scope of the mod. I'll think about it.

     

    Also it would be nice to randomize the exotic items added by the BG II tweakpack (when it is used for tutu)

    and the BGII scrolls when they are added to tutu by SCS

    Yeah, I think I can do that.

  12. Hello, I ran across a bug, and I'm not sure if any of the already established fixes apply.

    Well, feck.

    It's a new bug I managed to introduce in 6.6. I'll try to have an update of 6.6 available tomorrow.

    You can fix it locally by opening the file "randomiser/lib/macros.tpa" with a text editor and replacing "iiic_num_item" with "iiic_num_itm". There's only one instance.

  13. what's a change-log and were can i find it?

    It's not necessary. It's another case of proto-corruption caused by Item Randomiser. (Phenomenologically it's all but invisible until the right mod is installed on top; SCSII in this case.)

     

    V6.6 will be out within a day or two.

  14. I originally had this planned in some of my works, but if you are willing to do this in a more optimal way I'd have one less thing to worry about: A new component called PnP Infinite Book of Spells (see description).

     

    My idea is that the installer would generate a truly random infinite book as per the AD&D description in the following way:

    1.) first it would search through and record all valid wizard (and priest) spell scrolls in the game, which automatically covers mod-added spells

    2.) the installer would generate an organized list of all valid spells/scrolls in the game

    3.) the installer would generate the book (according the AD&D description) by randomly picking from the list.

     

    -Galactygon

     

    Sounds a bit outside the scope of Item Randomiser. But it does sound like it could fit aTweaks. If you're willing to wait until my modding interest swings back up I could have a look at it then.

  15. In my game both beastmaster in Copper Coronet and Haegan were without armors, and there weren't keys on their bodies. Could it be caused by randomizer?

    I'd guess no. Item Randomiser doesn't touch Haegan at all (and doesn't do anything particular with the beastmaster).

    Did they drop any items at all?

     

    If you upload the files beast.cre and haegan.cre (both from your override, probably) along with change-logs of them, I could have a look.

  16. Zal (sp?) the fastest dart thrower in the world in the BG1 part loses his bracers of archery. Isn't those bracers pretty much tied to him/this encounter?

    I guess that's open to interpretation. As I see it, there's nothing about the encounter that doesn't work even without the bracers. Being able to back it up has never been a prerequisite for boasting. Not to mention he's trying to intimidate you into giving him your money, or that the bracers don't actually have anything to do with being the "fastest draw in the west."

  17. This was unclear to me from the readme, so it might be a suggestion to note this in newer versions of the readme: It appears reinstalling without preserving save games results in only randomizing items for future (unvisited) areas. (This conclusion might not be full though, i wonder if the items from areas i did visit are 're-randomized' and i might find them again)

    It does say you need to start a new game after installing the mod, unless you use the option to preserve saved-game compatibility.

    When you visit an area it is stored in your saved game and conventional modding has no further apparent effect on the area until you start a new game.

     

    Another thingy, upon checking for whether i was in a randomized game i noticed Hangards Axe +2 from Draug Feas party (Tarnor) in the sewers is not in the list of randomized items. (i checked the 6.5 readme too btw)

    You're right. I shall have to add it to the list.

  18. I have been accused of proliferating the amount of available money in the game before, so maybe something to combat that would be in order. Making Cespenar and Cromwell charge more is a good suggestion. And maybe there's something else that can be done.

     

    I know Aurora does something with gold rewards and random loot tables, so I'd have to see if there's something left for me.

  19. Yeah, if you have the scroll and the hammer but lack either of the other two components you'll get a NVROL. I wonder how I thought the current setup was safe.

     

    V6.5 can be expected soon-ish, probably along with some sort of hotfix for Cespenar.

  20. I couldn't install version 6.4. It failed with the following error when I tried to install mode 1 with no items lost:

     

    ERROR: error loading [randomiser/ssl/ssl_out/fltier.baf]

    For some reason the folder randomiser/ssl/ssl_out has gone missing. Simply creating the folder should allow you to install the mod. Will fix in the next update.

  21. Well, I guess I'll include all the inns then.

    Most mod-added inns are located in copies of Beregost, copies of IWD's towns (log cabins), or areas of roughly the same type. The exceptions I know of are two inns from TDD, which are located in the wilderness of Amn/Tethyr and one from NTotSC, which is some sort of castle east of Baldur's Gate.

     

    But I'd like to keep the Underdark as the exception, since the large majority of the area is not an inn. If someone would like to include it, it's easy enough have an AreaCheck for ar2100.

×
×
  • Create New...