Editing
ClipMod:Adding a project
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Adding the project == <code>Project</code>s are made up of many different parameters and settings, all accessible via the <code>Mod.addProject</code> method. The <code>addProject</code> ''parameters'' are as follows: <pre> Mod.addProject(name: string, description: string, price: Requirements, requirement: Requirements, display: string, todo: (isStrat: boolean) => void) </pre> Each parameter, when broken down, can be interpreted as follows. The example provided is the vanilla "World Peace" project: # <code>name: string</code>: The title/name of a project, e.g. <code>"World Peace"</code> # <code>description: string</code>: The description below the visual name of a project, e.g. <code>"Pareto optimal solutions to all global conflicts. (+12 Trust)"</code> # <code>price: Requirements</code>: The requirements to ''buy'' the project, e.g. <code>{"yomi": 15000, "operations": 30000}</code>. This is also automatically added to the title as subtext, i.e. how "World Peace" has "(15,000 yomi, 30,000 ops)" next to it. # <code>requirements: Requirements</code>: The requirements to ''view the project in the player's "Projects" section'', e.g. <code>{"projects": ["projectButton29"]}</code>. For "World Peace", the project depends on ''another'' project with the DOM ID <code>projectButton29</code>. ''This'' is the string used, '''not''' the index in the <code>projects</code> array. # <code>display: string</code>: What to display in the console when the project is purchased, e.g. <code>"World peace achieved, +12 TRUST, global stock prices trending upward"</code> # <code>todo</code>: The function to run once your project is completed, e.g. <code>() => { trust += 12; stockGainThreshold += 0.01; }</code> === The <code>Requirements</code> type === The parameters of type <code>Requirements</code> are paramount, since they control ''if'' the player can and ''when'' the player can buy your project. <code>Requirements</code> is a dictionary, and there are a few supported keys that can be checked against: * <code>operations: number</code>: Minimum operations. * <code>trust: number</code>: Minimum trust. * <code>clipmaker_level: number</code>: Number of AutoClippers. * <code>mws: number</code>: Number of megawatt-seconds (HypnoDrones phase/phase 2 only). * <code>yomi: number</code>: Number of yomi from Strategic Modeling. * <code>honor: number</code>: Number of honor from battles (probe phase/phase 3 only). * <code>funds: number</code>: Amount of dollars in Available Funds (pre-HypnoDrones phase/phase 1 only). * <code>projects: string[]</code>: Array of project IDs, attainable from the DOM/Inspect Element when available to be purchased for from the corresponding entry in the global <code>projects</code> array's <code>id</code> field. * <code>custom: () => boolean)</code>: True/false value determined by a function. <code>true</code> means this requirement passes, <code>false</code> means it fails the requirement. All of these default to passing the requirement, so an empty <code>Requirements</code> type means that the project is available as soon as the Projects menu is unlocked.
Summary:
Please note that all contributions to matthyWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
MatthyWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Request account
Namespaces
ClipMod
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Tools
What links here
Related changes
Page information