User Tools

Site Tools


cw4:cpack:docs:8a6ac9be-ba98-41ae-8bf3-a61783b84cad

Index

qople - Multimap

canonical link to CPACK - where to get the author-maintained version

Multimap is a campaign editor made entirely within Creeper World 4's custom unit system. Because of this, no knowledge of 4RPL is required to use it. This guide assumes basic knowledge of how to import CPACKs and navigate the level editor.

Opening the Layout Editor

In the editor, the level map is toggled with a button. When you first import the CPACK, the first thing you'll notice is a green button next to your build units labeled “Edit Layout.” Clicking this button will toggle the layout editor, which is where you can add levels and transitions into your campaign.

Opening the layout editor will add 5 units to the “custom” tab: Level, Transition, Goal, Thumbnail, and Help. These units make up the entirety of Multimap, and are the only custom units you need to know.








Multimap Units

Each level unit represents one map in your campaign. Clicking on one and either pressing its UI button or pressing Ctrl + Spacebar will switch to that map. Opening its script settings will allow you to change various attributes about the level:

  • TITLE: The name of the level
  • DESCRIPTION: The description shown below the title when clicked on
  • START_MSG_CHANNEL: The name of an ADA message channel to show when the level is switched into (only works outside of edit mode)
  • COMPLETE_MSG_CHANNEL: The name of an ADA message channel to show when the level is completed.
    • The completion message is shown as a game message (A text box on top of the screen), not an ADA message, to disincentivize excessive ADA message spam.
  • COMPLETE_MSG_BUTTON: The text shown on the button below the level's ending game message.
  • UNIT_UNLOCKS: A formatted string determining the level's unit unlocks.

Show unlock formatting details

Show unlock formatting details

  • Formatted as “TYPE:AMT,TYPE:AMT” for however many units you want to unlock.
  • TYPE is the unit type of the unit to unlock, or the CMOD GUID for a custom unit.
  • If AMT is 0, that unit will be set to locked when unlocks are applied.
  • If AMT is positive, that many units will be *added* to the cap (if you have 2 max cannons and the unlock string says “cannon:5”, you will have 7 max cannons after.)
  • If AMT is negative, the unit limit for that unit will be removed.
  • For custom units, you must format it as TYPE:AMT:SECTION, where SECTION is a number specifying the build tab your unit should appear under:
    • 0=STRUCT
    • 1=WEAPON
    • 2=AIR
    • 3=SPECIAL
    • 4=CUSTOM
  • If APPLY_UNLOCKS_ON_LOAD is 1 (the default value), then unit unlocks will be given to the player when they start the level, but removed if they leave without beating it. If this value is 0, unlocks will only be given when the level is completed.
  • CUSTOM_COMPLETE_EFFECTS is a way for completing levels to grant custom forms of meta-progression to the player.

Show completion effect details

Show completion effect details

  • It should be a string formatted as “EFFECT:VALUE,EFFECT:VALUE”
  • Will apply the given effects with the given values.
  • By base, the only effect is “IncreaseEnergy” which will increase the rift lab's base energy generation by the given value.
  • For instance, “IncreaseEnergy:0.5” will start the player with 1.5 energy generation instead of 1.0 for every level in the campaign after they beat this level.
  • FOR SCRIPTERS: Adding custom effects is easy, since all that this does is run SendMsg(“EFFECT” “VALUE”) on level completion. Just make sure to change the data type from a string in your script that receives the message.




Global Scripts

The map switcher manages and creates all map saves, and does the work to switch between them. Its script settings are:

  • CUSTOMUNITS: a comma-separated list of the GUIDs of all player-buildable custom units in the campaign.
  • PAUSE_ON_SWITCH: Whether to pause the game when the map is changed (recommended to leave on)
  • SAVE_BUILD_LIMITS: When 0, build limits will be the same for all levels, and unlocks can be used to unlock (or lock) units as more levels are beaten. When anything else, build limits will be saved with the rest of the map, and overridden with each map load. No unit unlocks will work with this setting on.
  • ERNS_PERSIST: If this is anything other than 0, the player can keep all ERNs from all levels they complete and use them in all levels afterward. If it is 0, only ERNs you place in each level can be used.
  • MAP_SPOILER_MODE: A number from 0 to 4 that decides how much information to show the player about maps they cannot travel to. The values are:
    • 0: Show all information about locked maps (title, description)
    • 1: Hide description for locked maps, but show their title
    • 2: Hide title and description for locked maps (default)
    • 3: Fully hide locked maps until unlocked. Will still show the location of Win squares.
    • 4: Fully hide locked maps and win squares.




Misc Info

Will Multimap reset my saves?

It is highly recommended you keep at least one backup save in your editor scratch slots at all times, especially if you are using any other custom content.

Multimap will never delete any map saves, for any reason. If you accidentally delete a level unit, place another down and it will link to the same save again.

Can I use (this other CPACK) in my campaign?

Multimap supports custom units in theory, although due to the nature of custom content, some units or CPACKS might do something that breaks the pack. In general, the more complex the content, the more likely it will need changes to be compatible. This is the responsibility of the one who made the unit to fix.

Multimap is not currently compatible with FPS, PAC, or any other full-conversion mod.

A Note on Save File Size

Multimap saves each level in a compressed manner that allows (relatively) low save file sizes. However, it should be noted that save files larger than 10 MB cannot be uploaded to colonies.

Here are some tips on keeping save size down:

  • Don't cover the whole map in creeper or special terrain. This is the single biggest factor in save file size. A map will take up about 10 times as much save file space if fully covered in creeper or special, or 20X if covered in both.
    • This will only matter on large map sizes with many levels. Normal use will not have this problem.
  • Rough terrain will take up slightly more save file space than smooth terrain.




Using your own 4RPL with Multimap

This section requires knowledge of 4RPL.

Multimap is compatible with custom content, but there are some differences. This section aims to provide an outline of everything you need to keep in mind when writing scripts for your campaign.

Global Scripts

Global scripts should only be used with Multimap if they should apply to every level in the campaign. An easier, more performant, and more reliable way to make a global script for one level is to make an invisible unit somewhere on or outside of the map that runs all the level's global scripts. If you want the script to run while paused, or outside of the unit update phase, register the unit for MSG_PreUpdate, MSG_PostUpdate, or MSG_FrameAdvance.

Custom Units

Most custom units should be compatible with Multimap with little to no modification. Make sure that @GameLoaded is not used for unit initialization.

Creating a Custom Objective

Making a custom objective is different in Multimap than in the base game, since it involves sending messages to a unit. The main difference is in how you update the objective text, which you have two ways of doing:

  • Use the automatic text replacement rules in the custom objective overview, or
  • Manually grab the transition's UID, and change CUSTOM_RUNNING_TEXT with SetScript1Var. It will reset to whatever you originally set it to whenever the map is reloaded.

List of Units (CMODS) in this CPACK

cw4/cpack/docs/8a6ac9be-ba98-41ae-8bf3-a61783b84cad.txt · Last modified: 2025/02/14 14:57 by 127.0.0.1