Jump to content


Alonso's Content

There have been 35 items by Alonso (Search limited from 06-June 23)


By content type

See this member's


Sort by                Order  

#606838 Help with first mod ideas

Posted by Alonso on 13 June 2019 - 04:56 PM in IE Help

Thank you, Mike, that worked. It took me hours of editing, but I finally have my tra and 2da files updated with the info about scrolls. I could use two 2da tables for this, but I thought it would be more sensible and easier to maintain to keep everything in a single table. In order to do this, though, I had to include the file extensions (spl or itm) in the 2da file, for otherwise there would be name conflicts. So I added some logic to my tp2 file to distinguish between scrolls and spells:

 

COPY - ~AlonsosMod/spells.2da~ ~AlonsosMod/spells.2da~
READ_2DA_ENTRIES_NOW ~r2en_spells~ 3
FOR (row = 0; row < r2en_spells; row += 1) BEGIN
    READ_2DA_ENTRY_FORMER ~r2en_spells~ row 0 resource
    READ_2DA_ENTRY_FORMER ~r2en_spells~ row 1 name
    READ_2DA_ENTRY_FORMER ~r2en_spells~ row 2 description
    
    INNER_ACTION BEGIN
        ACTION_IF (FILE_EXISTS_IN_GAME ~%resource%~) BEGIN
            COPY_EXISTING ~%resource%~ ~override~
            ACTION_IF (~%resource%~ STRING_CONTAINS_REGEXP ~spl~) BEGIN
                SAY NAME1 (AT name)
                SAY UNIDENTIFIED_DESC (AT description)
            END
            ACTION_IF (~%resource%~ STRING_CONTAINS_REGEXP ~itm~) BEGIN
                SAY NAME1 (AT name)
                SAY DESC (AT description)
            END
        BUT_ONLY
    END
END

 

WeiDU complained about that, though, so I must have broken some syntax rule there. Can you tell what the problem is?




#606892 Help with first mod ideas

Posted by Alonso on 26 June 2019 - 04:00 PM in IE Help

OK, not many candidates to be my guinea pig here :P. Maybe I need a bigger audience. I'd like to publish this mod and make it available for the community, but I'm not sure of what is the best place to publish it. Any suggestions?




#606897 Help with first mod ideas

Posted by Alonso on 27 June 2019 - 01:33 AM in IE Help

That sounds good. Quick silly question: So far I've only tried the mod in BG2, right now I don't even have BG1 installed, so I guess I should publish it in the BG2 modding subforum of Beamdog rather than in the general modding subforum, right?




#606902 Help with first mod ideas

Posted by Alonso on 27 June 2019 - 06:41 AM in IE Help

I intend to make it compatible with BG1 in the future, so I've published it in the General Modding subforum: Improved Spell Descriptions. So there goes my first mod. Thank you for all your help!




#606819 Help with first mod ideas

Posted by Alonso on 08 June 2019 - 02:01 PM in IE Help

Thank you, Mike, I corrected that and the mod works again (and it's much easier to maintain now).

 

Once again the mod is fully functional, but it is still incomplete: It changes the spell descriptions for spells, but not for the scrolls used to learn those spells. In order to update the scroll descriptions the first step is to extract the descriptions of the scrolls, just like we did before with spells. For that we used Gwendolyne's description extractor routine. In order to do so I'm modifying Gwendolyne's routine, editing the block that processes spells to make it process scrolls instead.

 

In this block I want to start by checking what kind of item is in each item file. If it is not a scroll, I ignore it and move on to the next item. Apparently item files store their item types in the "General name" field, so I need to read that field and check its contents. I'm stuck there because I don't know the syntax. This is my rough attempt, which WeiDU doesn't like, of course:

 

ACTION_FOR_EACH item IN ABAZRING ABISRED1 ACIDBL ACIDMIST ACIDOOZ1 ACIDOOZ2 ACIDOOZ3 BEGIN

    ACTION_IF (FILE_EXISTS_IN_GAME ~%item%.itm~) BEGIN

        COPY_EXISTING ~%item%.itm~ ~override~
            READ_LONG 0x08 item_type
            READ_LONG 0x50 scroll_description
            READ_LONG 0x?? scroll_name  // How do I figure out the offset for the scroll name (identified name)?
            PATCH_IF (scroll_description > 0 AND item_type > 0 AND scroll_name > 0) BEGIN   // Syntax?
                GET_STRREF %item_type% str_item_type
                PATCH_IF (str_item_type == "Scroll") BEGIN // Syntax?
                    GET_STRREF %scroll_name% str_name
                    SPRINT str_name EVAL "@%iter% = ~%str_name%~%WNL%"
                    SET iter = iter + 1
                    GET_STRREF %scroll_description% str_desc
                    SPRINT str_desc EVAL "@%iter% = ~%str_desc%~%WNL%"
                    SPRINT output EVAL "%output%%WNL%%item%%WNL%%str_name%%str_desc%"
                    SET iter = iter + 1
                END
            END
        BUT_ONLY
    END
END

 

The comments mark the problematic lines, the lines where I'm obviously doing something wrong. Any tips on how to make this work?




#606675 Help with first mod ideas

Posted by Alonso on 19 May 2019 - 08:13 AM in IE Help

That sounds great, Gwendolyne. Take your time.




#606640 Help with first mod ideas

Posted by Alonso on 13 May 2019 - 03:28 PM in IE Help

Thanks, that looks promising. So what would be the full contents of the tp2 file?




#606661 Help with first mod ideas

Posted by Alonso on 17 May 2019 - 04:55 PM in IE Help

Thank you, jastey, don't know how that mistake crept in.

 

For the spell Protection from evil, 10’ radius I want to change the name of the spell, because it's actually a 15' radius. Will changing the name have any negative impact in the rest of the game? If not, what is the field name for the spell name?




#606670 Help with first mod ideas

Posted by Alonso on 18 May 2019 - 07:23 PM in IE Help

Thank you, that worked. We're getting closer! :)

 

I have already edited thirteen spell descriptions, and I'm starting to realize that this is an awful lot of work. Eventually I'm gonna edit hundreds of descriptions, so I think it would save me a lot of time if I could export all those descriptions and their file names (SPIN943.spl and the like) to a big text file and work directly with that text file, instead of having to find and copy the spell descriptions and their file names one by one in NearInfinity. I have tried a couple of ideas in this sense, but none has helped:

 

- I tried the Mass export tool in NearInfinity, but it just exports a few thousand spl files in binary format. I guess the references to the dialog.tlk strings must be there somewhere, but I don't know how to find them (or even if they would be useful if I did).

 

- I had a look at the dialog.tlk file, and yes, the spell descriptions are there in plain text, which is nice. They are tangled in funny ways with other strings, but that shouldn't be a problem, I can untangle them. The problem is that I don't have a mapping of these descriptions to their file names (like SPIN943.spl), and without that mapping the descriptions are useless to me. I could still edit the dialog.tlk file directly, but you told me at the beginning of this thread that doing so is "frowned upon" because it is "destructive compatibility-wise", so that's a no-no.

 

So I'm wondering if there might be any way of exporting the text of the spell descriptions linked to their file names.




#606623 Help with first mod ideas

Posted by Alonso on 10 May 2019 - 10:28 PM in IE Help

I have an awful lot of mod ideas. I have published the list here. As I say in that thread, many of them are not very suitable for a complete beginner, so I would like to start with one of the easiest ones. From the conversation in that thread it looks like some easy ones are:

 

- Combat log: Say when a character uses a wand or some other magical item.

- Fix Zone of Sweet Air.

- Improve the descriptions of some spells.

 

Looks like the last one would be the easiest one, I imagine it's just changing a piece of text.