Jump to content

Editing and Adding spl files


Guest Alex

Recommended Posts

Well, I would need to see the files to know for sure. I am not exactly aware at which point you get access to the G3's upload feature which allows you to upload files. And how large that file size is at first.

But to overcome that, you can upload the files, prefered as a .zip file to any site you can link them from up to here.

Link to comment
10 hours ago, Jarno Mikkola said:

Well, I would need to see the files to know for sure. I am not exactly aware at which point you get access to the G3's upload feature which allows you to upload files. And how large that file size is at first.

But to overcome that, you can upload the files, prefered as a .zip file to any site you can link them from up to here.

Looks like I have access, heres the file

Balanced_shapeshifter_Kit.zip

Link to comment

Why's the setup-Balanced_shapeshifter_Kit.exe in the "Balanced_shapeshifter_Kit" folder, it should be out so it's not in the same level as the SPL etc folders, which are inside the directed folder in the .tp2 file, and yes, the .tp2 can be inside the custom folder.

 

Then, you use ...   

LAUNCH_PATCH_FUNCTION ~ADD_SPELL_CFEFFECT~ // Immunity to normal weapons. Regular werewolf.
This is a casting feature effect, aka they come to pass when you use a spell...

While you might want to use this:

LAUNCH_PATCH_FUNCTION ~ADD_ITEM_EQEFFECT~ ... which is item equpping effect.. as you add these to an item.

These are both in the macro's.

Link to comment
33 minutes ago, Jarno Mikkola said:

Why's the setup-Balanced_shapeshifter_Kit.exe in the "Balanced_shapeshifter_Kit" folder, it should be out so it's not in the same level as the SPL etc folders, which are inside the directed folder in the .tp2 file, and yes, the .tp2 can be inside the custom folder.

the .exe was in the folder for simplicity, that way everything is in one folder while I move stuff around and make backups.

41 minutes ago, Jarno Mikkola said:

Then, you use ...   

LAUNCH_PATCH_FUNCTION ~ADD_SPELL_CFEFFECT~ // Immunity to normal weapons. Regular werewolf.
This is a casting feature effect, aka they come to pass when you use a spell...

While you might want to use this:

LAUNCH_PATCH_FUNCTION ~ADD_ITEM_EQEFFECT~ ... which is item equpping effect.. as you add these to an item.

These are both in the macro's.

Thanks! I've updated the code, although it looks like that wasn't the issue since the bug is still there.

Link to comment
On 5/7/2020 at 9:11 AM, Jarno Mikkola said:

Why's the setup-Balanced_shapeshifter_Kit.exe in the "Balanced_shapeshifter_Kit" folder, it should be out so it's not in the same level as the SPL etc folders, which are inside the directed folder in the .tp2 file, and yes, the .tp2 can be inside the custom folder.

 

Then, you use ...   

LAUNCH_PATCH_FUNCTION ~ADD_SPELL_CFEFFECT~ // Immunity to normal weapons. Regular werewolf.
This is a casting feature effect, aka they come to pass when you use a spell...

While you might want to use this:

LAUNCH_PATCH_FUNCTION ~ADD_ITEM_EQEFFECT~ ... which is item equpping effect.. as you add these to an item.

These are both in the macro's.

Ok, its been a couple days and I still can't figure it out. shifting directly from one werewolf form to either normal or greater werewolf gets rid of the abilities I added. Meanwhile any form turning into the Lesser werewolf and the Lesser retains the abilities its suppose to have. Aside from names and values, theres little difference between any of the files. 
The only reason I can think of is that turning from one form to another causes it to ignore the override file and go for the vanilla files. And since Lesser doesn't exist outside the override file, it has no choice but to load in the version in override.

Most of the changes are in the .itm files but even the changes I made to the .cre files are ignored. I changed the ADD_SPELL_CFEFFECT to ADD_ITEM_EQEFFECT and its made no difference.

https://drive.google.com/open?id=1b5-4iSDCR7bcxGvyl13oSNdZoBSTVhsP

Link to comment

The problem, is the nested hierarchy of the files, .spl, .itm and .cre.. we just need one if we go with editing the spell and allow spell casting in that form.

... let's try this the other way around, we just use existing files from the original game...

 

So the .tp2 starts:

BACKUP ~Balanced_shapeshifter_Kit/backup~  
AUTHOR "Alex"
BEGIN ~Balanced_shapeshifter_Kit~  

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////                                                  \\\\\
///// Lesser Werewolf Form				               \\\\\
/////                                                  \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

//we do not alter the original file at all we just copy it over to another file so
	COPY_EXISTING ~spcl643.spl~ ~override/spcl645.spl //complete spell effect for Lesser Werewolf form
LPF ~DELETE_SPELL_EFFECT~ INT_VAR opcode = 135 END
LPF ~ADD_SPELL_EFFECT~ INT_VAR 
		opcode = 135
		target = 1
		power = 0
		timing = 2
		duration = 3600000
		parameter1 = 0
		parameter2 = 1
		probability1 = 100                                                             
//		insert_point = 0                                             
		STR_VAR
		resource = werewodr
END
//then we add in the other stat effects
LAUNCH_PATCH_FUNCTION ~ADD_SPELL_EFFECT~ // Sets Werewolf forms Constitution score to 15
 INT_VAR
opcode = 10                                                                  
target = 1                                                                     
timing = 2                                                                    
parameter1 = 15                                                                 
parameter2 = 1                                                                
probability1 = 100                                                             
insert_point = 0                                                  
END	
//and continue from there

There might be a way to disable spell casting in this form* and then allow it based on the character level score later. .. but .. I would just use this for now.

As the nested hierarcy comes with disabling the spell casting. This has the weakness of the spell being dispelled easily. The way around that is to use items rather than the spells.

*well the player won't be able to cast spell, the custom script assigned to the character would be able to cast... yey, cheating AI, the best partner in crime.

The difference between the ADD_SPELL_CFEFFECT, ADD_ITEM_EQEFFECT and ADD_SPELL_EFFECT is the source of the feature, if it comes from the item, then use the ...ITEM_EQ... one, if it's there during the casting, then use the ..CF.., but if it's meant to be there after the spell is casted, then it should use the one without the ..CF.. in it.

Edited by Jarno Mikkola
Link to comment
13 hours ago, Jarno Mikkola said:

The problem, is the nested hierarchy of the files, .spl, .itm and .cre.. we just need one if we go with editing the spell and allow spell casting in that form.

... let's try this the other way around, we just use existing files from the original game...

 

So the .tp2 starts:


BACKUP ~Balanced_shapeshifter_Kit/backup~  
AUTHOR "Alex"
BEGIN ~Balanced_shapeshifter_Kit~  

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////                                                  \\\\\
///// Lesser Werewolf Form				               \\\\\
/////                                                  \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

//we do not alter the original file at all we just copy it over to another file so
	COPY_EXISTING ~spcl643.spl~ ~override/spcl645.spl //complete spell effect for Lesser Werewolf form
LPF ~DELETE_SPELL_EFFECT~ INT_VAR opcode = 135 END
LPF ~ADD_SPELL_EFFECT~ INT_VAR 
		opcode = 135
		target = 1
		power = 0
		timing = 2
		duration = 3600000
		parameter1 = 0
		parameter2 = 1
		probability1 = 100                                                             
//		insert_point = 0                                             
		STR_VAR
		resource = werewodr
END
//then we add in the other stat effects
LAUNCH_PATCH_FUNCTION ~ADD_SPELL_EFFECT~ // Sets Werewolf forms Constitution score to 15
 INT_VAR
opcode = 10                                                                  
target = 1                                                                     
timing = 2                                                                    
parameter1 = 15                                                                 
parameter2 = 1                                                                
probability1 = 100                                                             
insert_point = 0                                                  
END	
//and continue from there

There might be a way to disable spell casting in this form* and then allow it based on the character level score later. .. but .. I would just use this for now.

As the nested hierarcy comes with disabling the spell casting. This has the weakness of the spell being dispelled easily. The way around that is to use items rather than the spells.

*well the player won't be able to cast spell, the custom script assigned to the character would be able to cast... yey, cheating AI, the best partner in crime.

The difference between the ADD_SPELL_CFEFFECT, ADD_ITEM_EQEFFECT and ADD_SPELL_EFFECT is the source of the feature, if it comes from the item, then use the ...ITEM_EQ... one, if it's there during the casting, then use the ..CF.., but if it's meant to be there after the spell is casted, then it should use the one without the ..CF.. in it.

 

I had the idea of creating new versions of the cdbrbrp files with the polymorph effect being appearance only and with all the abilities they would need. The HLA would go into the SPCL files and change what item file it uses for the weapon.

For example Effect 17 of SPCL643.spl is a Create Weapon (111) that tells the game that the werewolf forms uses CDBRBRP.itm. So selecting the HLA will delete it and create a new Effect that uses a CDBRBRP4.itm that will have all the abilities of the form and spellcasting.... but thats assuming theres a macro or opcode that can do that. 

 

Of course thats a moot point unless I can figure out the transformation glitch....

 

 

 

Link to comment

ok I partially found the reason for the abilities not showing up when transforming between forms. I had put:

Quote

COPY_EXISTING ~cdbrbrp.itm~ ~override~

instead of:

Quote

COPY_EXISTING ~Balanced_shapeshifter_Kit/ITM/cdbrbrp.itm~ ~override~

For the regular werewolf this works EXCEPT for the immunity to normal weapons....

and this fix doesnt seem to work for the Greater werewolf...

https://drive.google.com/open?id=1b5-4iSDCR7bcxGvyl13oSNdZoBSTVhsP

Link to comment

That unfortunately explains nothing... see, if you use the _EXISTING, the file needs to be in the game files, which it is not if you use the mods own folder to try to COPY_EXISTING.

Also you need to remember for the changes to happen whre you alter the file say in NearInfinity, they do happen immidietly after you have done the alteration, aka if you start a new game after you save the file in Near Infinity. But if you use a weidu mod, you need to also copy the exported file from Near Infinity to the mods folder and then install the mod, for you to then start a new game, to see it in action.

Link to comment
On 5/10/2020 at 1:44 AM, Jarno Mikkola said:

That unfortunately explains nothing... see, if you use the _EXISTING, the file needs to be in the game files, which it is not if you use the mods own folder to try to COPY_EXISTING.

Also you need to remember for the changes to happen whre you alter the file say in NearInfinity, they do happen immidietly after you have done the alteration, aka if you start a new game after you save the file in Near Infinity. But if you use a weidu mod, you need to also copy the exported file from Near Infinity to the mods folder and then install the mod, for you to then start a new game, to see it in action.

Yeah, every time I change something I re-install the mod and start a new game to make sure the files are being used.

 

ive rewritten the code so that the t2p file takes care of almost everything ( only clabdr03.2da needs to be copies to the game folder now), it creates the Lesser Werewolf creature and the other files pertaining to it from the existing files.

Unfortunately there are some parts I'm not sure how to edit. For example, the creatures attributes themselves:

Quote

    COPY_EXISTING ~WEREWODR.CRE~ ~override/WERELEDR.CRE~ // adds the Lesser Werewolf creature
            SAY NAME1 ~Lesser Werewolf~
            SAY NAME2 ~Lesser Werewolf~
            SAY 0x5d ~10~ // Magic Resistance
            SAY 0x46 ~4~ // Natural AC
            SAY 0x48 ~4~ // Effective AC
            SAY 0x52 ~1~ // APR
            SAY 0x238 ~18~ //STR
            SAY 0x23c ~15~ // DEX
            SAY 0x23d ~15~ // CON

I know that SAY works with descriptions but for numerical values it ends up giving a completely different number. I'm assuming there's something else I'm suppose to write but I cant find it on the Weidu page.

Quote

        LAUNCH_PATCH_FUNCTION ~ALTER_SPELL_EFFECT~ // LINKS TRANSFORMATION WITH CORRECT PAW ATTACK
          INT_VAR
            check_globals = 1
            check_headers = 1
            header = 1
            header_type = 1
            match_opcode = 111
          
          STR_VAR 
            resource = ~CDBRBRP3.ITM~
        END

This code is suppose to link the the correct Paw item to the Lesser Werewolf but when I try the mod Shapeshift: Lesser Werewolf keeps giving me the normal Werewolf stats.

I thought that maybe its related to the previous issue.

 

 

And like before, transforming from one wolf form to another causes them

 

https://drive.google.com/open?id=1b5-4iSDCR7bcxGvyl13oSNdZoBSTVhsP

Link to comment
1 hour ago, gamemaster76 said:

    COPY_EXISTING ~WEREWODR.CRE~ ~override/WERELEDR.CRE~ // adds the Lesser Werewolf creature
            SAY NAME1 ~Lesser Werewolf~
            SAY NAME2 ~Lesser Werewolf~
            SAY 0x5d ~10~ // Magic Resistance
            SAY 0x46 ~4~ // Natural AC
            SAY 0x48 ~4~ // Effective AC
            SAY 0x52 ~1~ // APR
            SAY 0x238 ~18~ //STR
            SAY 0x23c ~15~ // DEX
            SAY 0x23d ~15~ // CON

You could go horrifically wrong here... you need to use WRITE_BYTE, WRITE_SHORT's and WRITE_LONG's depending the lenght of the stat in the .cre file.

Link to comment
9 hours ago, Jarno Mikkola said:

You could go horrifically wrong here... you need to use WRITE_BYTE, WRITE_SHORT's and WRITE_LONG's depending the lenght of the stat in the .cre file.

Thank you! that worked like a charm. Every form has whats its suppose to have!

the only issue left is the transformation glitch. It seems when I polymorph when I'm already polymorphed, the game ignores all of the global effects I added.... 

 

https://drive.google.com/open?id=1b5-4iSDCR7bcxGvyl13oSNdZoBSTVhsP

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...