You are here

[EE] How to build module using CPP?

2 posts / 0 new
Last post
Phenomen
[EE] How to build module using CPP?

1. Which scripts needs to be loaded (in module, area or npc properties) to make CPP (spells, fixes, AI etc) work?

2. How to change settings (switches) since override use pre-compiled scripts?

3. A lot of 2das seems to change same tables as CEP. How exactly to merge those?

4. Some files in hak are duplicating same in ovr. What's a point of hak?

  • up
    50%
  • down
    50%
Shadooow

Very shorty now, as I don't have access to my dev PC:

 

First of all I repeat - all of this is optional, community patch will work automatically without doing anything. You might not take effect of all fixes there are but that isn't big deal, unlike other packages like PRC/3.5ruleset community patch is designed to work in every module automatically and without any extra work.

 

1) I would recommend to merge or execute module even scripts - they have following prefix 70_mod_def_* and you can either open them within toolset if you check core game assets when opening scripts or in the installation package in "ovr" folder. Then either manually merge the content of these scripts with your own scripts for specified events or call them using ExecuteScript command ie.

Except this, to take full effect of all fixes/improvements you should compare the scripts in your module with scripts from CPP and manually merge them. This is not that important to do, unless you want to use new features such as dynamic overriding of the spell informations (ie. dynamimcally changing caster level, dc, metamagic, damage cap, damage type and more). Basically this consists only of 2 types of scripts - vanilla includes and spellscripts. Rarely ever module modified any other scripts from core game. For includes, using a compare tool such as Beyond Compare you can quite easily duplicate changes CPP made into version of the includes in your module. Spellscripts on the other hand has been completely rewritten and are using brand new formatting/style so this is not possible. Generally speaking, unless you modified too many of them, then I suggest to redo the changes you made into spells from scratch into scripts from CPP - that would be done as writing down what changes you did into which spellscript, then deleting it from module an then re-opening the script from care game resources. Then redo the changes you've done into new script and compile. If you modified too many scripts this is probably not worth it for you.

However - many module builders modifyies all spellscripts in order to make some global changes like changing caster level calculation etc. For those who did that, they can easily drop all spellscripts and use variable based dynamics spell overriding system which is described in detail here: Tutorial: How to modify caster level, DC or metamagic dynamically without need to recompile all spellscripts.

Similarly CPP offers several "family" spells modifications using module switches. If you changed spellscripts in order to:

- disable damage shield spells stacking
- disable AOE spells stacking
- disable weapon buff spells stacking
- enable weapon buffs to affect ranged weapons/gloves/ammo

then again you can delete your spells and setup these features/changes using module switches.

 

Oh forgot, builders often modifies AI: but those who did that should know how to merge it with CPP or if they even want to do that. Basically manual merging will be required, comparing tool such as Beyond Compare should speed this task greatly. But this would only be needed if you are using vanilla AI and just made some small modifications in there. Those using AI replacement such as TonyK AI etc. should not worry about this at all, CPP fixes vanilla AI and does not affect custom AI reworks.

 

And one more thing. You should try to recompile all your scripts. Even without merging anything, recompiling all scripts in your module should automatically bring some of the CPP fixes/functionalities into scripts compiled before you installed CPP. This should ńot throw any (new) errors. CPP was designed in way it is backwards and forwards compatible, you should be able to re-compile all your scripts without error. If that is not case report here please.

 

2) not sure what you mean, does this answer your questions? Tutorial: What are the module switches and how to configure them.

 

3) in the archive with CPP there is a folder for module builders, inside this folder is auto2damerger tool. There is a readme how to use it but strictly speaking: drop all 2das from your "top hak" into folder input, run merge.bat and then install the fixes/changes as you see fit (it should ask for each modification rule) or just confirm all. This will automatically dupplicate CPP changes into your 2das, the output will be in folder "merged". Then put these changed 2das into top hak and tell players to download it.

Note: this is not needed, yes you might loose some fixes but merging 2das will require to make new hak which might not be of benefit to you. Especially if you are using only CEP and nothing else, merging 2das wont give you much.

Similarly for no-hak modules using 2das in overrides - put 2das from override into input run merge.bat confirm what you want then copy content of merged folder back into override.

  • up
    50%
  • down
    50%