• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Help with modding

kiploom

Landlubber
Hey im new to the forum and the whole modding potc <img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" />
I was wondering if you could help me with something. I have receantly downloaded the cheat enabler v2 and I was wondering what am I doing wrong because I wanted to improve it to add the Main character cheat
Heres what I have so far
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->#include "events.h"
#include "globals.c"
#include "animals.c"
#include "sea_ai\sea.c"
#include "ships\ships.c"
#include "Encounters\Encounters.c"
#include "worldmap\worldmap.c"
#include "locations\locations.c"
#include "Loc_ai\LAi_init.c"
#include "store\goods.h"
#include "cannons\cannons.c"
#include "nations\nations.c"
#include "particles.c"
#include "initinterface.c"
#include "characters\characters.c"
#include "interface\interface.h"
#include "store\storeutilite.c"
#include "dialog.c"
#include "quests\quests.c"
#include "islands\islands.c"
#include "reload.c"
#include "situations.c"
#include "battle_interface\loginterface.c"
#include "calendar.c"
#include "teleport.c"
#include "utils.c"
#include "ITEMS\items.h"
#include "ITEMS\itemLogic.c"
#include "ITEMS\items_utilite.c"
#include "weather\WhrWeather.c"
#include "controls\controls.c"
#include "landencounters\landencounters.c"

extern void wdmInitWorldMap();
extern void InitGoods();
extern void InitStores();
extern void InitItems();
extern void InitCharactersTables();
extern void InitCharactersNames();
extern void CreateCharacters();


native float Bring2RangeNoCheck(float fMin1, float fMax1, float fMin2, float fMax2, float fValue);
native float Bring2Range(float fMin1, float fMax1, float fMin2, float fMax2, float fValue);
native float Degree2Radian(float fDegree);
native float Clampf(float fValue);
native int RDTSC_B();
native int RDTSC_E(int iRDTSC);
#libriary "script_libriary_test"


#event_handler(NEW_GAME_EVENT,"NewGame");
#event_handler(GAME_OVER_EVENT,"GameOverE");
#event_handler("Control Activation","ProcessControls");
#event_handler("MainMenuKey","ProcessMainMenuKey");
#event_handler("InterfaceKey","ProcessInterfaceKey");
#event_handler("CameraPosAng","ProcessCameraPosAng");
#event_handler("Cheat","ProcessCheat");
#event_handler("SeaDogs_ClearSaveData", "ClearLocationsSaveData");

void ProcessCheat()
{
    string sCheatName;
    ref mc;
    sCheatName = GetEventData();
    mc = GetMainCharacter();

    switch(sCheatName)
    {
        case "Immortal":
            if(LAi_IsImmortal(GetMainCharacter()))
            {                
                LAi_SetImmortal(GetMainCharacter(), false);
                Log_SetStringToLog("God mode OFF");
            }else{
                
                LAi_SetImmortal(GetMainCharacter(), true);
                Log_SetStringToLog("God mode ON");
            }
        break;

        case "ShotGun":
            if(globalSGMode != false)
            {
                globalSGMode = false;
                Log_SetStringToLog("Shotgun mode OFF");
            }else{
                globalSGMode = true;
                Log_SetStringToLog("Shotgun mode ON");
            }
        break;

        case "Health":
            LAi_SetHP(mc, 500.0, 500.0);
            Log_SetStringToLog(" HP Set to 500/500 ");
        break;

        case "Gold01":
            mc.money = sti(mc.money) + 1000;
            Log_SetStringToLog(" + 1,000 Gold");
        break;

        case "Gold02":
            mc.money = sti(mc.money) + 100000;
            Log_SetStringToLog(" + 100,000 Gold");
        break;
        
                case "Skill":
            mc.skill.freeskill = sti(mc.skill.freeskill) + 50;
            Log_SetStringToLog(" + 50 Skill Points");
        break;
        
                case "Abilities":
                mc.perks.FreePoints = sti(mc.perks.FreePoints) + 20;
                Log_SetStringToLog(" + 20 Ability Points");
        break;

                case "Experience01":
                        mc.experience = sti(mc.experience) +1000;
                Log_SetStringToLog(" + 1,000 Experience");
        break;

                case "Experience02":
                        mc.experience = sti(mc.experience) +10000;
                Log_SetStringToLog(" + 10,000 Experience");
        break;

                case "Experience03":
                        mc.experience = sti(mc.experience) +100000;
                Log_SetStringToLog(" + 100,000 Experience");
        break;

                case "Experience04":
                        mc.experience = sti(mc.experience) +1000000;
                Log_SetStringToLog(" + 1,000,000 Experience");
        break;

        case "Reputation":
            mc.reputation = REPUTATION_MAX;
            Log_SetStringToLog("Reputation Set to MAX");
        break;

        case "Morale":
                        mc.ship.crew.morale = MORALE_MAX;
            Log_SetStringToLog("Crew Morale Set to MAX");
        break;
        
        case "Female":
            mc.model = "Danielle";
            mc.sex = "woman";
            mc.FaceId = 30;
            mc.model.animation = "Woman";
            mc.model.height = 1.75;
            Log_SetStringToLog("You are now female");
        break;<!--c2--></div><!--ec2-->
Thats in the seadogs.c here the controls init_pc (The code I have changed in the file is above case female)
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// Teleport
    //CI_CreateAndSetControls( "", "TeleportActive", CI_GetKeyCode("VK_F4"), 0, false );
    //CI_CreateAndSetControls( "", "TeleportUp", CI_GetKeyCode("VK_UP"), 0, false );
    //CI_CreateAndSetControls( "", "TeleportDown", CI_GetKeyCode("VK_DOWN"), 0, false );
    //CI_CreateAndSetControls( "", "TeleportSelect", CI_GetKeyCode("VK_RETURN"), 0, false );

    // weather
    //CI_CreateAndSetControls( "", "WhrPrevWeather", CI_GetKeyCode("KEY_M"), 0, false );
    //CI_CreateAndSetControls( "", "WhrNextWeather", CI_GetKeyCode("KEY_N"), 0, false );
    //CI_CreateAndSetControls( "", "WhrUpdateWeather", CI_GetKeyCode("KEY_B"), 0, false );
    //CI_CreateAndSetControls( "", "Tele", CI_GetKeyCode("KEY_P"), 0, false );


        CI_CreateAndSetControls( "", "CheatEncounters", CI_GetKeyCode("KEY_6"), 0, false );
        CI_CreateAndSetControls( "", "CheatExperience01", CI_GetKeyCode("KEY_7"), 0, false );
        CI_CreateAndSetControls( "", "CheatExperience02", CI_GetKeyCode("KEY_8"), 0, false );
        CI_CreateAndSetControls( "", "CheatExperience03", CI_GetKeyCode("KEY_9"), 0, false );
        CI_CreateAndSetControls( "", "CheatExperience04", CI_GetKeyCode("KEY_0"), 0, false );    

        CI_CreateAndSetControls( "", "CheatGod", CI_GetKeyCode("KEY_Y"), 0, false );
    CI_CreateAndSetControls( "", "CheatShotGun", CI_GetKeyCode("KEY_U"), 0, false );
        CI_CreateAndSetControls( "", "CheatHealth", CI_GetKeyCode("KEY_I"), 0, false );
        CI_CreateAndSetControls( "", "CheatAbilities", CI_GetKeyCode("KEY_O"), 0, false );
        CI_CreateAndSetControls( "", "CheatSkill", CI_GetKeyCode("KEY_P"), 0, false );

        CI_CreateAndSetControls( "", "CheatGold01", CI_GetKeyCode("KEY_G"), 0, false );
    CI_CreateAndSetControls( "", "CheatGold02", CI_GetKeyCode("KEY_H"), 0, false );
        CI_CreateAndSetControls( "", "CheatReputation", CI_GetKeyCode("KEY_J"), 0, false );
        CI_CreateAndSetControls( "", "CheatMorale", CI_GetKeyCode("KEY_K"), 0, false );
        CI_CreateAndSetControls( "", "CheatNationRelations", CI_GetKeyCode("KEY_L"), 0, false );
        CI_CreateAndSetControls( "", "CheatFemale", CI_GetKeyCode("KEY_T"), 0, false );
}<!--c2--></div><!--ec2-->
The control set is above (CheatFemale)
This is exactly how it is done in the cheat enabler and it doesn't work. Anyone know why?
And could someone tell me a website that has potc coding tutorials?
Thanks, Drunk
(btw the code changes your chracter to daneille when you press t in game)
 
are you using the mods from THIS site? i haven't heard of a cheat enabler before. not around here, at least.
 
Im not using any mods yet I just want to try modding myself
The cheat enabler isn't a huge mod it just enables the cheat code buttons that were added with the game but never used (There found in seadogs.c file
 
Hi DoR,

Well, I am not sure what you are trying to accomplish with all this. If you just want to change the main character to Danielle, there is an easier way to do that. Also, what "cheats" are you looking for? Immortality? Higher Rep or Rank? Better starting stats? Better equipment or ship? If so, there are easier ways to improve those too.

Just let me know what you are trying to do and I probably have an easy way to do it. Since I am not able to download any of the Builds right now, I have learned a great deal about how to change the stock game.
 
<!--quoteo(post=194186:date=May 11 2007, 02:29 PM:name=Mary Read)--><div class='quotetop'>QUOTE(Mary Read @ May 11 2007, 02:29 PM) [snapback]194186[/snapback]</div><div class='quotemain'><!--quotec-->Hi DoR,

Well, I am not sure what you are trying to accomplish with all this. If you just want to change the main character to Danielle, there is an easier way to do that. Also, what "cheats" are you looking for? Immortality? Higher Rep or Rank? Better starting stats? Better equipment or ship? If so, there are easier ways to improve those too.

Just let me know what you are trying to do and I probably have an easy way to do it. Since I am not able to download any of the Builds right now, I have learned a great deal about how to change the stock game.<!--QuoteEnd--></div><!--QuoteEEnd-->
What I am trying to accomplish is to make key T in game change your character to daneille with a message saying You are now female.
 
can you download the mods here? with the build, you can buy skins at tailor shops, including that of danielle. it's a simply matter of changing your outfit.
 
<!--quoteo(post=194255:date=May 12 2007, 04:04 AM:name=Drunk on rum)--><div class='quotetop'>QUOTE(Drunk on rum @ May 12 2007, 04:04 AM) [snapback]194255[/snapback]</div><div class='quotemain'><!--quotec-->What I am trying to accomplish is to make key T in game change your character to daneille with a message saying You are now female.<!--QuoteEnd--></div><!--QuoteEEnd-->

So, you want to be able to change your character to female anytime in the game just by hitting "T"? Sort of an instant sex-change? Why? <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

Now, if you want to start a new game with a female main character, there is an easy way to do that. And the rest of that code you posted seems to indicate that you also want more money, higher skills and abilities, increased rep and rank, better weapons and immortality. If so, there are easier ways to that too. You can also start with whatever ship you want, make encountering MOWs possible, eliminate storms and even increase the max number of saved games. No code needed and takes less than an hour. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />

You will want to download the <i>Builds</i>; and when you are ready, you can get them here. However, it is recommended that you play the game through without them first. Unfortunately, the stock game is just awful, so you need to do something to make it playable. Just some little changes in a few files and you can improve the game greatly. <img src="style_emoticons/<#EMO_DIR#>/poet.gif" style="vertical-align:middle" emoid=":hmm" border="0" alt="poet.gif" />
 
<!--quoteo(post=194270:date=May 12 2007, 07:48 AM:name=Mary Read)--><div class='quotetop'>QUOTE(Mary Read @ May 12 2007, 07:48 AM) [snapback]194270[/snapback]</div><div class='quotemain'><!--quotec--><!--quoteo(post=194255:date=May 12 2007, 04:04 AM:name=Drunk on rum)--><div class='quotetop'>QUOTE(Drunk on rum @ May 12 2007, 04:04 AM) [snapback]194255[/snapback]</div><div class='quotemain'><!--quotec-->What I am trying to accomplish is to make key T in game change your character to daneille with a message saying You are now female.<!--QuoteEnd--></div><!--QuoteEEnd-->

So, you want to be able to change your character to female anytime in the game just by hitting "T"? Sort of an instant sex-change? Why? <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

Now, if you want to start a new game with a female main character, there is an easy way to do that. And the rest of that code you posted seems to indicate that you also want more money, higher skills and abilities, increased rep and rank, better weapons and immortality. If so, there are easier ways to that too. You can also start with whatever ship you want, make encountering MOWs possible, eliminate storms and even increase the max number of saved games. No code needed and takes less than an hour. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />

You will want to download the <i>Builds</i>; and when you are ready, you can get them here. However, it is recommended that you play the game through without them first. Unfortunately, the stock game is just awful, so you need to do something to make it playable. Just some little changes in a few files and you can improve the game greatly. <img src="style_emoticons/<#EMO_DIR#>/poet.gif" style="vertical-align:middle" emoid=":hmm" border="0" alt="poet.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->
Thanks for your help I am taking your advice and downloading a build <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
the best installation order would be this:

stock game
build 12.1
build 13
build 13 update 3
build 14 alpha 6 (there is an alpha 7, but it seems as if it has quite some issues)
PBmodifications

read the instructions CAREFULLY. otherwise the game won't work.
 
BTW: If you want to do modding, you can also do it WITH the Build mods. Preferrably do it with the mods, because that way we'll be able to use your mods as well when you do something interesting.
 
Hello everybody,

I don't wanna start a new topic, so I describe my request here:

Is there a way that you always start on land in the 1st person view and not in the 3rd. If yes, where do I have to look (what files) to change this ?
 
Back
Top