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

Solved Questions about console.c

Skyworm

Privateer
Storm Modder
Cheers Gentlemen,

has anything been changed with console?

I started free to play as Francis Drake, and like to give me some items. I press F12 for console, get the message console is executed, but nothing happens. It doesn't work for give character either. It's beens ome time since I last played this,s o I may miss something. Does console need to be enabled somewhere?

Thanks!
 
@Skyworm , Try the console file I attached here. It should give and equip your character with the best spyglass, compass, and clock (I made it for working on the new trade wind system).

It works for me with the latest update, so if it doesn't give you those 3 items, then we know something odd is going on.
 

Attachments

  • console.c
    34.7 KB · Views: 205
Does console need to be enabled somewhere?
Console seems to be structured in cases now. There are several in it, all serving for different purposes and to activate one of those you need to set switch(0) at the top of console.c to any case you like to use (or you simply make your own). For an example, if you want to port yourself to Vanderdecken in an instant just replace the 0 with a 4. Works then. :doff
 
Last edited:
Console seems to be structured in cases now. There are several in it, all serving for different purposes and to activate one of those you need to set switch(0) at the top of console.c to any case you like to use (or you simply make your own). For an example, if you want to port yourself to Vanderdecken in an instant just replace the 0 with a 4. Works then. :doff


:yes

@Skyworm

The console is now structured in cases.

If you just want to use it to give yourself things then all you do is use it as before :-


This is an example of my console - with some lines I use to give myself things - change my character etc. :razz

Code:
// Jerry-rigged console file.
//put code under ExecuteConsole() below.
//NK 04-08-28
// not needed I think extern void InitShips();
#include "SDK\LocatorWrite.c"
#include "Upgrade.c";
extern void InitItems();
extern void InitCannons();


void ExecuteConsole()
{
   ref pchar = GetMainCharacter();
   ref ch;
   int i;
   int limit;
--------------------------------------------------------------------------------------------------------->>>>>>Put any code you wish to action AFTER here
// Check liking with Smugglers
  
    LogIt("Amount = " + CheckSmugglingAmount(pchar) );
  
  
//   GiveItem2Character(PChar, "opium");
  
  
//   GiveModel2Player("ThomasLinch",true);  
  
  
//   GiveItem2Character(PChar, "albatross");
  
//   Apothecary Meds  
  
//   GiveItem2Character(PChar, "meds1");
//   GiveItem2Character(PChar, "meds2");
//   GiveItem2Character(PChar, "meds3");
//   GiveItem2Character(PChar, "meds4");
  
// To Increase Luck ( Sneak)
/*
   GiveItem2Character(PChar, "luckcharm");
   GiveItem2Character(PChar, "lockpick");
   GiveItem2Character(PChar, "book3");
   GiveItem2Character(PChar, "jewelry8");
   GiveItem2Character(PChar, "jewelry9");  
   GiveItem2Character(PChar, "indian7");
*/    
----------------------------------------------------------------------------------------->>>>>>Put any code you wish to action  BEFORE here
      switch(0)
  
  
                       // Case 0 = Enable reload (useful when you get stuck on boarding) + Set player type (if you cannot move anymore)
                 // Case 1 = Various test and cheat codes
   {                     // Case 2 = Location coordinate information
     case 1:                 // Case 3 = Automatic instant cheats in port
                       // Case 4 = Instant teleport to Hendrick Vanderdecken


You can do this if you don't want to use the cases ( leave the switch at 0 )

The cases were put in the console by various modders to enable them to test some of the things they are working on. :type1


:drunk
 
Last edited:
Yes, that's what I do as well. Forget the cases. Just put whatever you want right below the 'int limit' line. If it doesn't work, it's probably because I mistyped something, in which case the message "Executed Console" does not appear and there's likely to be a hint on what I did wrong in "error.log".
 
The reason for the cases is so that we can leave different things in there for different purposes and you can easily switch between them.
But more often than not, I put my own temporary code above the switch as well. Simple. ;)

That is also what I suggest doing here in tip #4:
Tutorial - Modding Tips & Tricks | PiratesAhoy!
 
Back
Top