[Guide] How to make a mod for Corruption of Champions

Lili

Member
Oct 7, 2016
16
0
I'm trying to add in my own custom body part to the Revamp source code, and have been searching for HOURS through the files, and I can't figure out how the hell the armType is set, how do I add a type of arm onto it? This is ridiculous lol. Can someone here help me?
 

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,787
You need new arm type to appearanceDef.as then desc of this body part to appearance and in Appearance add ingame desc for new type of arm that will be showing up. And last add new scene for TF to this new type of arm in Mutations.as


That I said based on code that was per chages to code as I know some of code for apperance may been moved to different files. Well easiest way to track those new places would be using program option to find and replace in all files for words ARM_TYPE_HARPY. Then looking on those few files you would find places where other types of arm types are desc near harpy one arm type and by looking how it's desc in code you can copypaste framgent and change name of arm type to the one you want to add.


Ahh right and later on not forget to look in Player.as to add this arm to one of race scores calculating fragment of code unless it would be used for some whole new race than thosoe existing in Revamp.
 

Lili

Member
Oct 7, 2016
16
0
You need new arm type to appearanceDef.as then desc of this body part to appearance and in Appearance add ingame desc for new type of arm that will be showing up. And last add new scene for TF to this new type of arm in Mutations.as


That I said based on code that was per chages to code as I know some of code for apperance may been moved to different files. Well easiest way to track those new places would be using program option to find and replace in all files for words ARM_TYPE_HARPY. Then looking on those few files you would find places where other types of arm types are desc near harpy one arm type and by looking how it's desc in code you can copypaste framgent and change name of arm type to the one you want to add.


Ahh right and later on not forget to look in Player.as to add this arm to one of race scores calculating fragment of code unless it would be used for some whole new race than thosoe existing in Revamp.





18

There is no appearanceDef.as, only appearance.as :/, and whenever I add a new armType to appearance.as it throws a bunch errors at me saying that it doesn't exist. :/
 

Lili

Member
Oct 7, 2016
16
0
Okay, I've added a whole new race to the code, I've added it to the all the BODY_TYPE_NAMES in Appearance.as, I've added a score and counter to it in Player.as, I've added descriptions to each body part in PlayerAppearance.as, I've added a consumable item to ConsumableLib.as, and added the consumable to Mutations.as with all the TF scenes.


However, it still gives me "Error: Access of undefined property LOWER_BODY_TYPE_TESTRACE", "Error: Access of undefined property EARS_TESTRACE", "Error: Access of undefined property FACE_TESTRACE" in Appearance.as and PlayerAppearance.as.

But it doesn't give me these errors in Mutations.as or Player.as, is there another class I'm supposed to be adding stuff to?


EDIT: JUST FOUND IT HURRAY THANKS FOR THE HELP!!! :)
 
Last edited by a moderator:

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,787
Yeah I knew my help will be not as accurate since Revamp have for some time slight different way it handle appearance and body parts. Vanilla and Xianxia use the smae older system in which it's jsut as I said in my post. That why I added tip to use search option in Flash Develop to find all places where specific words are located (first wanted say about using human arm but noticed it will not give all needed files thus I switched to tell about using harpy arm desc). Still I', glad you managed to handle it out and sorry I wasn't as much usefull as I would want to be.
 

mayosauce

New Member
Apr 28, 2016
4
0
I'm having a really hard time adding a perk to weapons and armor. Like i made these "Slut Bombs" for my goblin character, but i want them to do both attack and lust damage. Like Lethice's Whip. How would i do this?
 

Lili

Member
Oct 7, 2016
16
0
I'm having a really hard time adding a perk to weapons and armor. Like i made these "Slut Bombs" for my goblin character, but i want them to do both attack and lust damage. Like Lethice's Whip. How would i do this?





 

Weapons doing lust damage is much different from armor, for the weapon, you'll have to go into combat.as and CTRL+F for L_WHIP, then add an if-statement with a structure similar to it but for your weapon underneath.
 

uncle_blog

New Member
Nov 14, 2016
1
0
44
Trying to test project gives me the following error:

Y:\Projects\Programming\ActionScript\source\project\working\Corruption-of-Champions-Mod-1.0.2_mod_1.3.25\classes\classes\Saves.as(215): col: 45 Error: Type was not found or was not a compile-time constant: File.

public function getGameObjectFromFile(aFile:File):Object
^
Build halted with errors (fcsh).
(fcsh)
Done(1)
 

hatternumber0

Well-Known Member
Aug 27, 2015
264
18
Trying to test project gives me the following error:

Y:\Projects\Programming\ActionScript\source\project\working\Corruption-of-Champions-Mod-1.0.2_mod_1.3.25\classes\classes\Saves.as(215): col: 45 Error: Type was not found or was not a compile-time constant: File.

public function getGameObjectFromFile(aFile:File):Object
^
Build halted with errors (fcsh).
(fcsh)
Done(1)
Have you edited any code yet? What code did have you downloaded? Did you download it from the Releases tab? Also double check Adobe Flex SDK was installed
 
Nov 9, 2015
20
0
How would I go about rewriting the zone codes so that encounters that weren't there before can show up?

If I wanted to make it so that goblin alchemists can appear while exploring the Bog, for example
 

hatternumber0

Well-Known Member
Aug 27, 2015
264
18
How would I go about rewriting the zone codes so that encounters that weren't there before can show up?

If I wanted to make it so that goblin alchemists can appear while exploring the Bog, for example
By having to faff around with the code, as it seems each area seems to be coded differently. Generally though, there's a integer that increments how many choices there are, and then a selection that picks a random encounter up to that integers value. All of this will be in the areas classes/classes/scenes/areas/***.as file.

In bog.as for example, chooser is the number of scenes. It's currently 5, so you'll want to up this to 6.

Then, you'd want to add an else if statement in the same function after the last else if already there, but before else (which acts as a just in case).

//the double equals are important. And the random chooser will work from 0 to 5, so 6 will never be an option
else if (chooser == 5) {
//this code you can copy from exploration.as where goblin encounters normally are
kGAMECLASS.goblinShamanScene.goblinShamanEncounter();
spriteSelect(124);
return;
}


Note: In theory, this code works
 
Nov 9, 2015
20
0
By having to faff around with the code, as it seems each area seems to be coded differently. Generally though, there's a integer that increments how many choices there are, and then a selection that picks a random encounter up to that integers value. All of this will be in the areas classes/classes/scenes/areas/***.as file.

In bog.as for example, chooser is the number of scenes. It's currently 5, so you'll want to up this to 6.

Then, you'd want to add an else if statement in the same function after the last else if already there, but before else (which acts as a just in case).

//the double equals are important. And the random chooser will work from 0 to 5, so 6 will never be an option
else if (chooser == 5) {
//this code you can copy from exploration.as where goblin encounters normally are
kGAMECLASS.goblinShamanScene.goblinShamanEncounter();
spriteSelect(124);
return;
}


Note: In theory, this code works

You're an absolute diamond! Thank you so much.

Do you know if there's anywhere I could find a complete list of CoC sprites and what they look like?
 
Last edited:

hatternumber0

Well-Known Member
Aug 27, 2015
264
18
I'm not sure if that's all of them, they don't have all of Kitteh's, at least, but I should have specified that. My mistake!

To that end, how would I go about editing and adding my own sprites to the game's code?
Honestly, i have no idea where the sprites are saved. Just just seem to appear at some point in lib/src/coc/MainView.as. Could try asking one of the official coders (that being CoC and not the mods. Not even sure the mods have added any new sprites).
 

Stadler

Well-Known Member
Jun 21, 2016
366
18
48
You can install the Adobe Flex SDK including the Standalone Flash Debugger through FlashDevelop under: Tools -> Install New Software:
FlashDevelop-Tools-Install_Software.png
 

MrProgrammer

New Member
Nov 30, 2016
1
0
34
For those stuck on the GC out of memory error, try setting the output file to something outside of the main project folder. This fixed it for me.
 
Nov 9, 2015
20
0
How would I go about making it so that Lumi can be accessed from a button? For example;
blah blah blah
menu();
addButton(1, "Lumi's Lab", (whatever code needs to be placed here for it to recognise Lumi), "Visit Lumi the alchemist.");

I try using Lumi.lumilabchoices but it says "Error: Access of undefined property" when I try to load it.

Many thanks
 

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,787
Iif refference to her is in coc.as file put under public var then you may been able to use kGMECLASS thing to wire it in. thou I not useing it doing some sometimes weird thing...I think when Stadler come here will be up to give more accurated path you need to take.
 

hatternumber0

Well-Known Member
Aug 27, 2015
264
18
How would I go about making it so that Lumi can be accessed from a button? For example;
blah blah blah
menu();
addButton(1, "Lumi's Lab", (whatever code needs to be placed here for it to recognise Lumi), "Visit Lumi the alchemist.");

I try using Lumi.lumilabchoices but it says "Error: Access of undefined property" when I try to load it.

Many thanks
Try addButton without the middle bit. I think it works like:

addButton(ButtonNumber, ButtonNameInQuotes, ButtonTarget);

So it would become:

addButton(1, "Lumi Shortcut", lumi.lumiEncounter);

If you get the same error, as Ormeal said, you'll need to have
import classes.GlobalFlags.kGAMECLASS;
at the top of the class.
 

Lili

Member
Oct 7, 2016
16
0
In the Revamp source code, is 3000 the max for kFLAGS, I've got a bit over 3000, and that last few (3001, 3002, 3003) don't seem to be saving. I don't think I'm using flags wrong, but I could be. Any help would be appreciated, thanks.
 

Lili

Member
Oct 7, 2016
16
0
In the Revamp source code, is 3000 the max for kFLAGS, I've got a bit over 3000, and that last few (3001, 3002, 3003) don't seem to be saving. I don't think I'm using flags wrong, but I could be. Any help would be appreciated, thanks.

Never mind this lol, didn't realize there were already variables saved in the kFLAGS class for anyone that wants to add new ones.
 

Vaalintine

Active Member
Sep 15, 2016
31
1
It seems this is a guide on how to create mods for CoC. What if we just wish to use a mod someone else has created?
 

Lancer

Well-Known Member
Nov 1, 2016
1,278
420
It seems this is a guide on how to create mods for CoC. What if we just wish to use a mod someone else has created?
Then there is no need for a guide. A modded version of CoC acts like a completely separate game from the vanilla CoC, so all you need to do is download the file and start it up, no need to mess around under the hood.
 

ReisenII

Member
Apr 3, 2017
14
0
34
After compiling, at the starting page the game version appears to be 0.9.4 Debug Build.
Is the source code offered actually some version older than the last one made (1.0.2) or am I doing something wrong? Or maybe it's just the opening screen that's outdated?
 

hatternumber0

Well-Known Member
Aug 27, 2015
264
18
After compiling, at the starting page the game version appears to be 0.9.4 Debug Build.
Is the source code offered actually some version older than the last one made (1.0.2) or am I doing something wrong? Or maybe it's just the opening screen that's outdated?
I believe the source code for the last few official versions was never released, i.e. when the final Lethice fight was created. I vaguely remember Kitteh6660 having to crack the final release open to combine it with the Revamp mod.
 

ReisenII

Member
Apr 3, 2017
14
0
34
I see, thanks for the info.
Does that means that only that final fight is nowhere in the source, right? I use the code like a Wikia to check things and to fool around editing scenes for myself, so I hope that other core parts are not missing.
 

Ormael

Well-Known Member
Aug 27, 2015
6,631
1,787
Code for last update to orginal unmodded CoC is public accesable (or it was few weeks/months ago). Not in main repo but in branch made with OXOIndustries or similary named account (which is one of accounts that Devs of orginal CoC and now TiTS owns).