Not logged inOpenClonk Forum
Up Topic Development / Scenario & Object Development / Creating game content
- - By TheLinuxist [de] Date 2010-12-18 17:11
Hello,

I'm new to OpenClonk, so I'm sorry if this question seems somehow... stupid. I've been playing Clonk since Clonk Planet became Freeware, and I also was developing objects and scenarios. But how do I access the editor mode in OC? I can't find any "Editor.exe" in my dir like with Clonk?
Thanks in advance! Great Work!
Reply
Parent - By Zapper [de] Date 2010-12-18 17:35 Edited 2010-12-18 17:40
If you want to start developing content, you should get an up-to-date version of the game data by cloning the OC repository (see here - only the clone thing!!).
Then you should follow the instructions here and get Eclipse

PS: The first step basically means installing TortoiseHG and cloning http://hg.openclonk.org/openclonk/ via rightclick->clone

PPS: Or just Mercurial for Linux of course, as you like
Parent - - By Günther [de] Date 2010-12-18 17:36
You make a copy of the game content, unpack it with c4group pack.c4? -x, create a copy of an object/scenario that's similar to your goal, and edit away. The editor is started with clonk --editor.
Reply
Parent - - By Zapper [de] Date 2010-12-18 17:39

>The editor is started with clonk --editor.


Guenther is not talking about Editor.exe here, though. I think you should head for Eclipse, TheLinuxist
Parent - - By TheLinuxist [de] Date 2010-12-18 17:56
Thank you. I will work myself into that. By the way, is there already a way to build and settle?
Reply
Parent - By Zapper [de] Date 2010-12-18 18:31

>is there already a way to build and settle?


No, not yet - settlement stuff will be the next big milestone
- - By TheLinuxist [de] Date 2010-12-19 18:19 Edited 2010-12-19 18:22
I was going to create a test scenario with flat landscape and an airplane. But how can I spawn objects? I already tried using the "Material" and "Vehicle" values in the Scenario.txt file and the script.c itself (using Create Object):

/*-- Neu --*/

#strict 2

func Initialize()
{
    var cp = FindObject(Find_ID(Clonk));
    var plane = CreateObject(Plane, cp->GetX(), cp->GetY(), 1);
  return 1;
}


That's the scenario script. What am I doing wrong?

// EDIT: Got it working using the "Vehicle" value in the Scenario.txt. But why isn't the script working?
Reply
Parent - - By Zapper [de] Date 2010-12-19 18:21
Initialize() is being called before the players join :)
You can use InitializePlayer(int player) that is called whenever a player joins
Parent - - By TheLinuxist [de] Date 2010-12-19 18:51
Thanks. I created a test object now, which is saved as TestObject.c4d. I wrote the definition file to the Scenario.txt file (it is found, at least according to the engine log) and add a "Material" definition like this:
[Player1]
(...)
Material=Shovel=1;Test=1

Why does this not work?
Reply
Parent - By Zapper [de] Date 2010-12-19 18:59
Mh, it could be that the Scenario.txt does not work as intended in some cases - I am not sure about that. That is, if you also do not get the shovel(?)
Parent - By MimmoO Date 2010-12-19 18:33 Edited 2010-12-19 18:38
you dont need #strict 2. all scripts are considered to be strict 2. also, as zapper mentioned, try using InitializePlayer(in player), which gives you the number of the player who just joined. 0 is the first player, 1 the second and so on. get the clonk the player controls, use GetCrew(int player) if it is only one, or GetCursor(int player) if there are more clonk and you want the one he selected.
also, feel free to join #openclonk-dev for questions.
Up Topic Development / Scenario & Object Development / Creating game content

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill