User Tools

Site Tools


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

This is an old revision of the document!


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

Levels

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.

Transitions

Transitions are how you add paths to your campaign, and objectives to your levels. They are placed by dragging them between two levels, instead of placing them down. Once placed, you can click on them and use their unit UI to select objective types and add them to that path. More than one objective can be added to a single transition. Objectives can be reclaim, collect, totems, nullify, time, or custom. All objectives other than time work the same as in vanilla Creeper World 4, and the time objective simply activates after a certain amount of time has passed, if the rift lab has not left the map (similar to a hold objective).

The time objective is not intended to be used as the main objective for a level.

Modifying Objectives

Each transition's script settings has options that let you customize your objectives a little more than the base game lets you:

  • If REQUIRE_ALL is set to 0, the transition will count as complete if any objective added to it is completed. If set to anything else, all objectives in the transition will be required.
  • RECLAIM_REQ functions the same as the “reclaim %” number in the editor's “Game” tab. It's description is as follows:
    • “The percent of peak creeper that the creeper must fall below to get the reclaim objective. Set to 0 for total creeper elimination.”
  • RECLAIM_CHARGE is the number of frames (30 frames = 1 second) it takes for the reclaim objective to charge. The default value of 450 frames means 15 seconds.
  • COLLECT_NUM, TOTEM_NUM, and NULLIFY_NUM all use the same format, for the collect, totems, and nullify objectives:
    • 0 means to require all infocaches, totems, or enemies
    • A positive number means to collect, activate, or nullify/destroy that many (COLLECT_NUM of 2 means “collect at least 2 infocaches”)
    • A negative number means to collect, activate, or nullify/destroy ALL EXCEPT that many (NULLIFY_NUM of -2 means “nullify all enemies except for 2”)
  • TIME is the number of frames (30 frames = 1 second) since the start of the level for the time objective to complete. The default value of 18000 means 10 minutes.
  • The rest is info for the custom objective, which is explained in its own tab.

Custom Objectives Overview (4RPL)

This section requires knowledge of 4RPL. A full walkthrough on how to make your own custom objective is located further down the page. This section focuses on the transition's UI for the objective.

Each transition can have one custom objective on it. It is updated by an external script through the 4RPL SendMsg API. Each custom objective has a few settings that must be set in the transition unit's settings:

  • CUSTOM_GOAL: If the transition is fed any number greater than or equal to this number, it will complete the custom objective.
  • CUSTOM_START_TEXT: A string that shows up as the objective description when the level is loaded into, before the player unpauses.
  • CUSTOM_RUNNING_TEXT: A string that is shown when the level is running. This can be changed directly with SetScript1Var, or will automatically update itself by these rules:
    • Any instance of “<percentage>” in the string will be replaced by an automatically calculated percent complete (last value given / CUSTOM_GOAL * 100), with the % sign included.
    • Any instance of “<amtleft> will be replaced by [CUSTOM_GOAL - last value given]. Useful for “Do something X times” types of goals.
    • Any instance of ”<rawval>“ will be replaced by the last value given, whether it is a string, number, list, or anything else.
  • CUSTOM_CHANNEL is the message channel used to communicate objective progress with this transition.

Goals

Goals are special types of levels that will complete the custom objective (beat the game) when they are unlocked. They show script settings like any other level, but they will ignore all of them. There can be any number of goal squares, and only one must be reached to win.

Thumbnails

Thumbnails are a special type of level that allow you to have a custom thumbnail for a colonies map that is not the first level of your campaign. This is done by saving a level that is switched out of immediately when loaded into.

To make one, add a thumbnail unit to your level, add a transition from it to the first level of your campaign, and make the thumbnail level like any other level. Just remember to finalize on the thumbnail before you upload it!

Help (unit)

The help unit that shows up on the layout editor can be used as a quick guide in-game at any time. It has basic, essential information on what things do, and will redirect you back to this page on mouseover. It will delete itself when you exit the layout editor.

Misc Info

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. 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 more save file space than smooth terrain.

Using your own 4RPL with Multimap

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.

List of Units (CMODS) in this CPACK

cw4/cpack/docs/8a6ac9be-ba98-41ae-8bf3-a61783b84cad.1691803715.txt.gz · Last modified: 2023/08/11 21:28 by qople