User Tools

Site Tools


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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
cw4:cpack:docs:8a6ac9be-ba98-41ae-8bf3-a61783b84cad [2023/08/11 21:28] – Continuing additions for 2.0 release qoplecw4:cpack:docs:8a6ac9be-ba98-41ae-8bf3-a61783b84cad [2023/08/12 14:56] (current) – Continuing additions for 2.0 release qople
Line 86: Line 86:
     * 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 "<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.     * 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.+  * CUSTOM_CHANNEL is the message channel used to communicate objective progress with this transition. The last value sent over this channel will be used for the text replacements above. 
 +    * It is recommended that you have a different message channel here for every transition with a custom objective, to minimize the chances of interference between them.
  
 <tabbox Goals> <tabbox Goals>
Line 99: Line 100:
 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. 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.
 </tabbox> </tabbox>
 +
 +\\
 +\\
 +\\
 +
 +===== Global Scripts =====
 +
 +<tabbox Map Switcher>
 +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.
 +
 +<tabbox Objectives>
 +The objective script checks once per second and updates progress on all objectives in the level. If you have any custom units you would like included in the nullify objective, you should list their GUIDs here.
 +
 +<tabbox Others>
 +All other global scripts have no settings, but they all serve a purpose.
 +
 +Editing.4rpl manages everything to do with the layout editor.
 +
 +CompleteEffects.4rpl contains the IncreaseEnergy completion effect, and can either be updated by script writers to add more, or used as an example.
 +
 +MVerse support.4rpl contains code for enabling multiplayer in your campaign. (Note that any custom content must be compatible with both MVerse and Multimap to work correctly.)
 +
 +DropInMVerse.4rpl allows players in an MVerse match to save and load their MVerse game in the middle of their session.
 +</tabbox>
 +
 +\\
 +\\
 +\\
  
 ===== Misc Info ===== ===== Misc Info =====
 +
 +==== Will Multimap reset my saves? ====
 +<note important>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.</note>
 +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? ==== ==== 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 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. Multimap is not currently compatible with FPS, PAC, or any other full-conversion mod.
Line 111: Line 155:
  
 Here are some tips on keeping save size down: 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. +  * 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.     * 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.+  * Rough terrain will take up slightly more save file space than smooth terrain.
  
 +\\
 +\\
 +\\
  
 ===== Using your own 4RPL with Multimap ===== ===== Using your own 4RPL with Multimap =====
  
 +<note>This section requires knowledge of 4RPL.</note>
 +
 +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 ====
 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 [[4rpl:commands:msg_preupdate| MSG_PreUpdate]], [[4rpl:commands:msg_postupdate| MSG_PostUpdate]], or [[4rpl:commands:msg_frameadvance| MSG_FrameAdvance]]. 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 [[4rpl:commands:msg_preupdate| MSG_PreUpdate]], [[4rpl:commands:msg_postupdate| MSG_PostUpdate]], or [[4rpl:commands:msg_frameadvance| 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 [[4rpl:commands:setscript1var| SetScript1Var]]. It will reset to whatever you originally set it to whenever the map is reloaded.
  
 ===== List of Units (CMODS) in this CPACK ===== ===== List of Units (CMODS) in this CPACK =====
cw4/cpack/docs/8a6ac9be-ba98-41ae-8bf3-a61783b84cad.txt · Last modified: 2023/08/12 14:56 by qople