Author Topic: Using the Clean SDK for Development  (Read 2625 times)

Offline noizeCode

  • I <3 teh codez
Using the Clean SDK for Development
« on: April 03, 2013, 02:43:43 pm »
Hi there,

I am a big FO-Fanboy and C/C++ Developer. Together with a Friend, I am planning a Fonline Mod.

We want to reinvent the Wasteland (at least parts of it :P), with focus on a new Character System and cool Custom Maps.

I have started a few days ago with setting up a server and client Scripts for a first Prototype . I used the foserv_clean-version from this Repository:

http://xp-dev.com/svn/foserv_clean/


After browsing thru TLA Scripts and Config Files, I started to fill the gaps in the Clean Version.

Being frustrated for 2 nights(Errors, Black-Screens, Black-GM, No Location Names on GM..etc) I finally got the first Prototype up and running (thx to RedBull and all the other Drugs  ;D).

Now we have to generate the Game Content and balance the ChaSys.

If i can help anyone with the Clean SDK just ask... I think it is a good Starting-Point if u want to do something different from TLA.   When I have the time I am going to make something like an UML-Class-Digramm, like a Roadmap for Scripts for the Clean-SDK.

When there are awesome Screenshots u will sees them here.. ;D


   


oh no.. my Mentats are gone....

Re: Using the Clean SDK for Development
« Reply #1 on: April 03, 2013, 07:35:23 pm »
I sent you a message, check this.

Offline noizeCode

  • I <3 teh codez
Re: Using the Clean SDK for Development
« Reply #2 on: April 03, 2013, 08:40:34 pm »
Here are my pieces of code that will make easier to start with the clean sdk.

More important than the code itself is in general knowledge of how this Software works, don't be afraid of code..:)

I work with notepadd++ at this time and what is really helpful is the "search in file"-function this programm offers.

With a liiiitle work u can figure out how all the stuff is conected... with the clean sdk you only have a handfull of classes compared to the tla sdk. If U want to know how to script functional Stuff just look in the Original SDK and compare the classes and copy some of the function-calls . Whatever u do... do it step by step... and think about it... its no Rocket-Science.

Before u follow my little hints download the Clean SDK and start the Client Server Duo without manipulating the .fos scripts. Register a Char log on to the Server and check out everything works. U won't see the Cursor don't worry just doo it....;D

So u downloaded the clean sdk and want to load a gloabal map make a few Loacations on it connected to .fomaps ?

LETS DO IT !LETS DO IT !LETS DO IT !LETS DO IT !LETS DO IT !LETS DO IT !LETS DO IT !LETS DO IT !LETS DO IT !LETS DO IT !LETS DO IT !LETS DO IT !LETS DO IT !LETS DO IT !
  • Copy the fallout.dat(from TLA SDK) and put it in int the _client-folder.
    In _client\Datafiles.cfg u add it. Now you can see the mousecursor and the TLA GM is loaded, but not visible yet....:).
    UR own worldmap has to be in the folder -client\data\core.zip\art\intrface... u have to change the  name in the .ini too.

    For more Info on the GM:

    http://fodev.net/forum/index.php/topic,25502.0.html

Code: [Select]

fallout.dat
data\core.zip


  • To unfog the GM you have to go into the main.fos file and add the nested-FOR-loops to the following function
Code: [Select]
void critter_init( Critter& cr, bool firstTime )
{
DSay( cr, "critter_init "+(firstTime?"(firstTime)":"") );



if(firstTime)
{
if(cr.IsPlayer())
{
                             //Set FOG_Half for every Sector on the GM
               for(uint x=0;x<__GlobalMapWidth ;x++)for(uint y=0;y<__GlobalMapHeight;y++) cr.SetFog( x, y, FOG_HALF );

              .
              .
              .
              .
              .
}


  • To add a location to the GM u have to go into the maps directory and have a look at Locations.cfg
Code: [Select]
[Area 1]
name = Desert #Location_Name
size = 6 #Size of Dot on GM
map_0 = e_desert1 1 #Map_Name Pid
entrance = 1 # How many entrance Points
visible = 1 # is Visible on GM
           and GenerateWorld.cfg
Code: [Select]
@ 1 375 555 #Desert(ID, X_COORD_ON_GM,Y_COORD_IN_GM)

  • Now UR Locations are in the Game, but when u start ur client u wont see them by default. Add this in main.fos
Code: [Select]
cr.SetKnownLoc( false, LOCATION_Desert );
       put it right under the part where the for_loops are. The next char you create can see the location due to if(firstTime)
  • The Locations are now marked on the GM...nice... but when the Cursor is over it... the Name does not appear..wtf!!

    To change that goto
    text\engl\FOGM.MSG
Code: [Select]
# Map 0, Global, base 10
{20}{}{Desert}#Location Name
# Desert, pid 1, base 101000
{101000}{}{Desert}#Location Title
{101005}{}{A generic piece of desert...}#Location Subtitle
    u can also add sounds,music,towninterfaces etc... u see how that is done in the Original SDK FOGM.MSG-File


This is it for now... I am going to write more Stuff about the Char and Perk Sys... but another Day.

Hope this helps in UR Projects... if u have any questions go ahead.
« Last Edit: April 04, 2013, 05:23:47 am by noizeCode »
oh no.. my Mentats are gone....

Offline Gob

  • The Good
Re: Using the Clean SDK for Development
« Reply #3 on: April 04, 2013, 06:34:36 pm »
Finally someone wrote something useful good job.

Offline noizeCode

  • I <3 teh codez
Re: Using the Clean SDK for Development
« Reply #4 on: April 04, 2013, 07:17:40 pm »
Glad I could help...:)
oh no.. my Mentats are gone....