Eoc modding newbie question

More
18 years 11 months ago #18666 by Cormorant
Forgive my foolish question, but I'm ambitious to get into EoC modding after messing around with I-War 1 scripts for years. (Some might remember a few of my old I-War missions - *plug, plug*)

So I've grabbed the SDK, the geography compiler, looked over the various documentations, example scripts and existing mods and realized I would need some help to get started.
What I'm basicly trying to do for now is get a player ship and maybe one or two custom objects to work with a simple custom geography setup containing a star system with celestial bodies and a space station. Or rather should these things be contained - I have not yet found a way to have a look at my "test system" in-game.

What I've done is creating a custom geography folder containing a custom clusters.ini, corresponding custom *.map and *.lws files for my test system, and a corresponding text folder (including clusters.csv and (System Name).csv)
I've also created a custom comsec_prefitted.ini as a player ship in the correct folder.
What really keeps me puzzled is how to even get started on POG. I believe I understand the basic structure of POG scripts, but I have no clue on what to do to get a custom scene in-game without messing with existing game scripts, or in other words:
I'm trying to create a player ship object at a specified location in my test system and have it ready for a little flight once I press the "New Game" button from the main menu.
I suppose there is a whole load of things I have to consider to achieve this. I'd just love to have a clue on what things I have to consider.

so long
cormorant

Please Log in or Create an account to join the conversation.

More
18 years 11 months ago #14373 by GrandpaTrout
Hi Cormorant,

Replacing the New Game is difficult. Can I suggest a change?

Use the Scenario feature. You can find several examples that do 99% of what you want:

Starting the player in a ship at a controlled location. One of the PS scripts does just this. The training rings Scenario. The SDK discusses this setup in some depth in the setting up your mod (way down at the bottom of the list of topics). I would be more specific, but I don't have the files at this computer.

Once you have that part running correctly, then add the custom cluster. And once that part is running correctly, then we can talk about what is needed to replace the New Game (should you really need that feature).


Please Log in or Create an account to join the conversation.

More
18 years 11 months ago #14374 by Cormorant
I suppose that's a good enough suggestion to get started. :)
Thanx a lot. I'll have a few tries, and I'm almost sure I'll post again ;)

Please Log in or Create an account to join the conversation.

More
18 years 11 months ago #14378 by Cormorant
Hi, again

So I realized EoC scripting is MUCH harder than your usual I-War 1 "declare something here, create something there and run the game"-scripting.
In advance, I'd like to thank EricMan64 for his mission tutorial - I wouldn't have come this far without it, though it's not pretty far yet. I have tried to create a very basic script to run with the Scenario function, involving a default system (Hoffer's Wake) and a default player ship setup (tried the prefitted comsec as well as the multiplayer cutter). I have managed to run the compiler (which is already a tough a mission on its own ;) ) and launch my pog script using the scanerio function. However, all I see is the Sky of Hoffer's Wake. No HUD, no cockpit, no player ship, no way to even control the camera.
I believed I had imported and considered everything necessary, but that doesn't seem the case as there is not even a player ship in my script. Okay, I can see the sky of the system I called (Hoffer's Wake), but that's all.
This is the content of my pog script so far [:I]

// Package name
package cutter_test;

// Imports

uses Debug, Global, iGame, iMapEntity, Sim, iSim, iShip, iShipCreation;

// Exports
provides Main, ScenarioMain;


// Prototypes - Functions defined for use in this package.
prototype Main();
prototype ScenarioMain();




ScenarioMain()
{
iGame.SetGameType( IGT_Mod );
iGame.StartNewGame( "map:/geog/badlands/hoffers_wake", "cutter_test" );
}

Main()
{
hmapentity hoffers_gap;
hship player = iShip.Create( "ini:/sims/ships/player/cutter.ini", "player_name" );
Sim.PlaceNear( player, hoffers_gap, 100000 );
iShip.InstallPlayerPilot( player );

}

I'd be glad about any hints on what I might have missed out. I assume it's a lot [:(]

Please Log in or Create an account to join the conversation.

More
18 years 11 months ago #14379 by mdvalley
I noticed you didn’t give hoffers_gap a value.

Try:

hmapentity hoffers_gap = iMapEntity.FindByNameInSystem("Hoffer's Gap", "map:/geog/badlands/hoffers_wake");

at the declaration

Please Log in or Create an account to join the conversation.

More
18 years 11 months ago #14380 by Cormorant
Thanx - looks like this was a mistake indeed, but fixing it didn't change anything in the outcome.
I've spent my friday afternoon trying to track down the cause of the problem; I've added and declared a suitable csv file for the player ship name, tried to define and call the player ship creation as a task and tried to arrange the script in a number of functions or tasks. I also tried to get a few ideas out of the various pog scripts supplied wth the SDK and looked through the pog documentation again, but nothing seemed to work.
Does anybody know if there's some VERY simplistic pog script for use with the scenario function around on the web? Something like this might be pretty helpful for reference.

Please Log in or Create an account to join the conversation.