Jump to content

Alonso's Content

There have been 35 items by Alonso (Search limited from 01-June 19)

By content type

See this member's

Sort by                Order  

#606951 [HELP WANTED] Proof reading for Mod translations in English

Posted by Alonso on 06 July 2019 - 04:22 PM in Classifieds

I've no particular preference. I'm Spanish and I'm fluent in English (fully bilingual). I own the full BG series and PS:T, but not IWD. So whatever fits me better.

#606935 [HELP WANTED] Proof reading for Mod translations in English

Posted by Alonso on 05 July 2019 - 01:33 PM in Classifieds

Still need help?

#606922 WeiDU Highlighter for Notepad++

Posted by Alonso on 29 June 2019 - 05:07 PM in IE Modding Tools

Try VScode.


Thanks for the suggestion. I'm trying VScode and it looks quite promising, although I have barely scratched its surface so far. However, I'm not sure of whether your extension supports tra files. I just opened a tra file and it doesn't have any syntax highlighting.

#606910 Making a weidu mod with your custom item

Posted by Alonso on 28 June 2019 - 02:45 PM in IE Tutorials

That fixed it, it works now. Thank you again :new_thumbs:


As I did this I corrected and expanded the original tutorial with everything we discussed here. I attach it in case someone is interested.

Attached Files

#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!

#606901 Making a weidu mod with your custom item

Posted by Alonso on 27 June 2019 - 04:19 AM in IE Tutorials

Hadn't thought about that. Still, I started a new game and I had the same result, the otyugh doesn't have the sword.


There is still the chance you didn't catch the one in Irenicus' dungeon, though. Try cheating in one of the cre files you patched.

That's what I've done.


Can you try it and see if you have the same problem?

#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?

#606895 Making a weidu mod with your custom item

Posted by Alonso on 27 June 2019 - 01:29 AM in IE Tutorials

Yeah, that's what I did to test: I loaded the first saved game I have, in which I still haven't moved from the first room in Irenicus dungeon, from there went to the room of the otyugh, and then I used the console to make it join my party. It didn't have the sword. NI, however, shows the sword in the otyugh's files, but with the error I mentioned.

#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?

#606891 Making a weidu mod with your custom item

Posted by Alonso on 26 June 2019 - 03:54 PM in IE Tutorials

Yes, I had already visited the dragon in the saved game I was using to test. So I tried with a game in which I hadn't visited the dragon yet. However, I didn't manage to test with this game. Using the console to travel directly to the dragon's lair crashes the game. I tried travelling to the temple ruins and going to the dragon's lair from there, but that also crashes the game, I guess the game must expect you to have completed all the previous steps in the quest before.


Since testing with the shadow dragon proved so complicated, I tried modifying the mod and giving the sword to the otyugh in Irenicus' dungeon instead. There are three otyughs in the game, so I gave the sword to all of them because I don't know which one is Irenicus'. The result is the same, the otyugh doesn't have the sword. Checking in NI, though, the otyughs do have the sword. However, when I try to open the sword item in NI I get an error: "Error reading null", "null". I attach the modified mod.


Attached File  mymod.zip   956.03K   37 downloads

#606877 Making a weidu mod with your custom item

Posted by Alonso on 24 June 2019 - 03:46 PM in IE Tutorials

Thank you, I forgot about this when I started my first mod a few weeks ago. Now I have completed the tutorial, but it's not quite working. It installs and it copies the sword and the dragon to the override folder, but the dragon doesn't have the sword. Can you have a look?

Attached Files

#606855 Help with first mod ideas

Posted by Alonso on 16 June 2019 - 07:53 PM in IE Help

Thanks, Mike, that fixed it.


And my mod is finished now!  :cheers:


Who wants to be my guinea pig and try it in their computer?

Attached Files

#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
        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)
            ACTION_IF (~%resource%~ STRING_CONTAINS_REGEXP ~itm~) BEGIN
                SAY NAME1 (AT name)
                SAY DESC (AT description)


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

#606829 WeiDU Highlighter for Notepad++

Posted by Alonso on 09 June 2019 - 01:16 PM in IE Modding Tools

Thanks, Gwendolyne, but that doesn't seem to be the problem in my case. For instance, right now the colour highlighting just changed when I reduced the indentation of a few lines. However, increasing the indentation again or even undoing all the indentations doesn't change the colours back.


For the record, a few days ago I tried reinstalling Notepad++ and updating to v7.7 (I was still using v7.6), but that didn't help.

#606820 WeiDU Highlighter for Notepad++

Posted by Alonso on 08 June 2019 - 05:22 PM in IE Modding Tools

This works quite inconsistently in my machine. The colours of the syntax highlighting change very often after I do some editing, but so far I haven't managed to see a pattern of what kind of editing provokes this change. In the picture attached I'm editing a tra file and using the Replace function to remove the line "Saving Throw: None". After removing one line the text above the line removed changes its colours:



#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:




        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


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

#606807 Help with first mod ideas

Posted by Alonso on 07 June 2019 - 02:51 PM in IE Help

Thank you, Mike and Gwendolyne. I've revamped the whole mod following your suggestions. However, for some reason the tp2 code doesn't work. I guess it must be some very basic syntax problem, but in this case I just cannot figure out what it might be. I attach the mod again so you can check it.


I feel a bit silly asking basic syntax questions like this one, but so far I haven't managed to find any documentation that I can understand. I've tried the WeiDU readme several times, but it looks like it assumes that the reader is a BG modding veteran and it gives for granted many concepts that are unknown for me.

Attached Files

#606797 Help with first mod ideas

Posted by Alonso on 03 June 2019 - 03:43 PM in IE Help

Your intuition is very good, Gwendolyne, that also worked :)


Looks like I have a fully functional mod now. I attach it to this post in case someone wants to try it. If you do try it, though, bear in mind that I'm still changing some descriptions. In that regard the mod is still incomplete, so you'll find mistakes and inconsistencies in the text.


As I work with spell descriptions I've realized that many of them are repeated. For instances, the files cdstaf12.spl, OHBWI308.spl, SPCL722.spl, SPDR301.spl, SPIN579.spl, SPIN714.spl, SPWI002.spl, SPWI308.spl, SPWI399.spl and SPWI997.spl are all copies of Lightning Bolt. That means that every time I change a bit of the description of Lightning Bolt I have to repeat that change ten times. That happens with hundreds of spells. Given the amount of changes I'm doing, that means an awful lot of repeated work. Therefore, even though the mod is perfectly functional as it is, I'd like to modify it to remove the repeated descriptions, so that when I change a description I only have to do it once.


That would be almost trivial in a language I'm familiar with, like Java, but in WeiDU I've no idea of how to do it. It would involve two steps:


1. Modify setup.tra: For each set of duplicated name/description pairs remove all the duplication and leave only one unique name/description pair. Associate each of these pairs with the names of the files to which they belong. This association can be done in several ways. I think the easiest would be to use some sort of numeric pattern in the string ids. I would do this manually.


2. Modify the tp2 file: Adapt the code to the modifications done in setup.tra in the previous step. This probably involves using arrays of strings (or the equivalent data structure in WeiDU) to handle the group of file names associated to each name/description pair.


I'm pretty sure it should be quite easy to do, 10-12 lines of code max. Any tips on how to go about this?

Attached Files

#606727 Help with first mod ideas

Posted by Alonso on 27 May 2019 - 10:24 AM in IE Help

Thanks again, Gwendolyne, that worked very well and the mod is essentially finished now. I ran into a minor issue, though: I removed some of the entries in my list of spells, which means that there is no longer a string for every single reference checked in the loop. Now WeiDU complains that it expected a string for one of the empty references. I guess fixing the code to deal with that should be very straightforward, a simple case of skipping the loop when the text references are empty. But with my almost non existent knowledge of WeiDU I can't figure out how to do it. Can you give me a clue?

Attached Files

#606682 Help with first mod ideas

Posted by Alonso on 22 May 2019 - 08:12 AM in IE Help

Thank you, Gwendolyne, that worked like a charm! :new_thumbs:
In order to streamline my workflow I modified a bit that routine to make it generate also the spell file name, apart from the spell name and the spell description. I attach the generated file to illustrate what I'm doing. My goal is to use just string references, rather than string literals, in my tp2 file. This is what I want to do:


COPY_EXISTING @100001 ~override~
SAY NAME1 @100002


Here, @100001 would be something like SPWI201.spl. However, it looks like doing this breaks some syntax rule, WeiDU complains about that @100001 reference. I attach the debug file with the error. What am I doing wrong?

Attached Files

#606677 Writing dialogue in .d for REAL beginners

Posted by Alonso on 20 May 2019 - 05:18 AM in IE Tutorials

I wanted to use this tutorial to learn some basics of IE modding, but this is a very complex topic (not for beginners in my opinion) and it's taking us a lot of  effort to clarify the concepts discussed here. I have a lot of mod ideas, but I don't think that these concepts are helpful for the kind of mods I want to create. So I think it's better to leave this area for now and focus on learning the concepts that are relevant for my mod ideas. Maybe I can come back to this tutorial when I have more experience with modding.


Thank you again for all your answers and clarifications.

#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.

#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.

#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?

#606657 Help with first mod ideas

Posted by Alonso on 17 May 2019 - 10:39 AM in IE Help

I tried that, but I still have the same problem. Anything else I might be missing? I attach the updated mod.

Attached Files