Closed cxong closed 11 years ago
Check if this is an existing bug; if so, doesn't need to be fixed yet.
Editor is broken even before fork; there also seems to be keyboard issues.
After fixing the editor (or maybe when replacing it entirely), perhaps check out http://www.mapeditor.org/ for a tile-based editor.
Judging from comments from the very first C-Dogs SDL on github, the editor was never restored, so this may be a tough nut to crack indeed!
One important defect of the editor is that the keyboard event handling is broken; there is no single-key-press event, so it's impossible to press a single key, making this a prerequisite (#60).
To fix the editor, a side-by-side comparison with the original editor would be required. Here's a very useful tutorial from http://cyberdogs2001.tripod.com/Trauts/editor.htm
Campaign Editor The campaign editor features a random number generator, and a character editor. You can imput values for wall length, ect., and it will make a level for you. There are ways to tweak it (by changing a value) until you get what you want. It is rather easy to use. The tutorial is below. Click here to see the 5 computer weapons.
Tutorial:
As long as the .cpn or .df file is in the c-dogs directory, it will be added to the list. To make a dogfight: After saving, just rename the .cpn part to .df To open/start a new campaign:
Go to the C-Dogs directory, either in MS-DOS PROMPT or the Run under START. Under run, just type in the address for the C-Dogs folder, then add a cdogsed filename.cpn, where filename is the name of the file that you want to open or create. Under MSDOS PROMPT, go to the cdogs folder, and type cdogsed filename.cpn. You cannot open a campaign from inside the editor.
Controls inside the editor:
Mouse:
Best way. Generally, left-click is increase, right-click decrease.
Keyboard:
arrow keys, Home & End to move about, PageUp/PageDown to alter values. shift + pageup/down to change other types of values. Keyboard to type.
Insert creates a new one, Delete deltes, Alt+N Creates a new one at the end (Character editor=new character,Other=New Level).
Alt+X= Cut. Alt+C= Copy. Alt+V= paste.
These keys will do different actions depending on which field is selected
Alt+S= Save campaign. Alt+E= Character Editor (Esc to go back). Esc= Exit.
Level options:
Len Maximum length a wall will be. Walls usually will be shorter due to lack of space.
Sqr Sqr is short for squares. Indicates the number of open areas (squares/rectangles) free from walls or rooms, the generator should try to create. The actual number may end up being less.
Walls The number of walls the game should try to create in the level.
Rooms The number of rooms the game should try to create in the level.
Density The number of non-mission-objective characters in the level. New characters will be created to mantain this number. Players can change the density from the options menu.
Hold shift-key to modify the "frequency"-numbers for map items at the bottom of the editor screen.
The last (unlabled) text field is a path to a music module. Type in the name of the .mod or .s3m file, and as long as it is in the C-Dogs directory, it will play it.
NOTE: INCLUDE MUSIC FILES IN ZIPS WITH YOUR CAMPAIGNS IF THEY ARE SET HERE. OTHERWISE, IT WILL ONLY USE DEFAULT MUSIC.
Mission Objectives:
Kill: (characters from mission objective characters pool)
Collect: (specified item)
Destroy: (specified item)
Rescue (specified character... should be Follower/Prisoner and preferrably Invincible as well)
Scout: ("see" x % of level. Maximum is 100)
Mission objective flags (click to right of objective to cycle through):
Hidden: (won't ever show up on auto-map)
Pos. Known: (visible on auto-map from start)
No count: (doesn't show remaining count for this objective)
If a mission objective has a reqired count of zero creates a bonus objective. It will not be listed during the briefing. If any of it is finished, it will be displayed purple when a user presses tab.
A rescue objective is completed if the prisoner is touched, but the pickup will NOT activate unless the prisoner is in the pickup zone as well. If the prisoner dies, the objective is failed. If the character does not have prisoner set, the objective will be completed right away.
You cannot have more than one kill objective w/ different sets of characters in the same mission (1 only) Same with rescue objectives.
Character Options:
Immunity- Does not take damage from gas
Asbestos- Does not take damage from fire
Invincible- Cannot be killed (This is a good thing to enable for prisoners)
Victim- Takes damage from anyone's shots
Penalty- Hurting character penalizes players' scores (good to enable for civilians usually)
Prisoner- Will stand still until touched by player
Follower- Will attempt to follow players around
Good guy- On players' side. Will not take direct damage from player shots, nor vice versa. If vicim is enabled, you can hurt them.
C-Through- Character is a grey outline that is filled in ("shadowy")
Delay- Delay in frames between AI decisions (will repeat last decision during this time)
Move- Probability in percent of the character moving
Track- Probability in percent of the character tracking players
Shoot- Probability in percent of the character using his/her weapon.
Runaway- Head away from players, rather than towards
Sneaky- Whenever a player shoots, will turn to face a player and shoot as well
Awake- If set, character will start moving about immediately
Asleep- If set, character will not do anything until spotted
NOTE: A good guy will not track players. A high Track % will cause them to stand still a lot
NOTE: If neither Awake or Asleep are set, characters will be one or the other randomly.
How to create an unarmed character: Give them a non-visible weapon, eg Confusion Bombs, and set Shoot to 0.
How to create a character that wanders randomly: Set Track to 0. A high delay is good for these characters, otherwise they may seem to shake in place.
WARNING: references to characters in the character secion are strictly by index. Thus, altering the order-eg by deleting a character-can (and will) directly mess up your references. You are advised to make your characters first, missions later. Users can change non-player health under options.
Is it planned to convert the levels into the JSON file format?
@sauer2 I have no concrete plans yet. However, I was thinking of investigating if tiled is a valid upgrade path.
From the changes made so far to get the editor working, it's become clear that it was broken because it was not ported at all. For example, some of the changes concerned using SDL keyboard/mouse types instead of what appears to be DOS or ASCII codes. This means it is and will be quite a bit of work to do.
The editor has clear usability flaws; it is unusable without a manual and relies on keyboard shortcuts for core functionality - alt+n to add new mission, for example. Many of these are simple to fix, but I'd like to do as little work as possible in improving the editor, and focus solely on getting it to work 100%. Efforts should be concentrated on making a new editor that can support new map features. If people find the editor useful and want it to improve, that's perfectly fine, but if no one cares too much, we should focus on the new editor.
Editor fixed; to prove it I made a campaign. Perhaps a tutorial would be useful too
Best to include a help screen which shows the keyboard shortcuts
Editor seems to be broken; not sure when this happened or why.