Author Topic: Code Genereation And Use  (Read 2340 times)

Fire Plague

  • Guest
Code Genereation And Use
« on: October 13, 2007, 07:39:58 PM »
this lookes to be the best place to post this. I can get the mapper to generate a code, I can get the map maker to save the colony game map, (I think it did) but how do you get the new .map file two have the new buildings for the human to show up and the tubes you built from the code generated. no compiler, no buldings, no tubes, no fun.  :(  Not a prgramer. (or better yet, tell me how to move the starting location to where i was trying to make the alternate bace)

Offline Hidiot

  • Hero Member
  • *****
  • Posts: 1018
Code Genereation And Use
« Reply #1 on: October 13, 2007, 08:08:15 PM »
used to not work for me either, but strangely, when I maximized the screen where you edit the map, I could generate the code...

But me advised, generating code will only place the objects on the map. If you want an AI, disasters, victory conditions, triggers, you'll need to code them yourself, as they are not included in the mappers code generation.
"Nothing from nowhere, I'm no one at all"

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Code Genereation And Use
« Reply #2 on: October 13, 2007, 09:27:04 PM »
Quote
this lookes to be the best place to post this.
Try the programming forum.
The mapper's code generator sucks. Just learn to use the SDK: http://wiki.outpostuniverse.net/SDK
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Code Genereation And Use
« Reply #3 on: October 14, 2007, 04:52:51 AM »
This is not the correct place to post this. Moved to mapping forum.

----

You can use the code generator if you open the map and then click on the icon at the top of the map window that looks like a small car with a tilted white rectangle behind it. (Should have a tooltip labeled "Place Units" or something to that effect).

You will get another window with the names of all the units. Once you place all your units, make sure the map window is selected (not the list window) and go to File > Generate Code...

It will produce C++ code to place all the units. Keep in mind, that's all it does (and not very well at that).