Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Please read the forum rules before posting.



Check if you are posting in the correct category.



The Off Topic section is not meant for discussing Cookie Clicker.

Looking into modding the game; doesnt make sense; help?

CalamityCalamity Posts: 14,798Member, Friendly ✭✭✭✭✭
I would like to know how to make new tech, and everything really? Has anyone begun to poke around in the code, I would really like to make some mods to test the waters.


Comments

  • gneratororgneratoror Posts: 131Member ✭✭
    edited March 28
    Oh yeah, i haven't really tested it and i am neither an experienced coder, but here is some docummentation.

    new G.[item abreviated]({}) --> this creates an item of certain kind, inside the curly braces, you have to write different parameters:
    EX: new G.res ({
    name:'pepper'
    })

    G.getDict('item').[parameter] ---> Usually for adding a parameter, on a sidenote, in case you are adding lets say an effect, you have to ad ".push" (which adds it to the array var in 'item'), in cases lie modes you do not have to.

    effects---> a parameter for versatile options, analize them well, for example in researches and traits they are often used with a function.

    type---> defines de parameter type.

    'func:function(){} --->this is generally used with G.getDict inside the curly braces to change something. A function itself is basically a list of commands that can get called easily, but i do not think you will need to use it that way.


    Here is the data.js file: http://orteil.dashnet.org/legacy/data.js?r=0.4908373869796532
    Also, do you know a trustable place to upload the file.
    Post edited by gneratoror on
    "First off, you should read my name again." -Uiomanca[n]t
    RPG Stats http://pastebin.com/biggveJk
    I am no way profesional
  • CalamityCalamity Posts: 14,798Member, Friendly ✭✭✭✭✭
    pastebin?


  • The_Cookie_MonsterThe_Cookie_Monster Posts: 196Member ✭✭
    Calamity said:

    pastebin?

    ᴎa m8, i will hak ur pastebin
    I AM YODA
    all my friends in the whole entire world: @The_Cookie_Monster, @The_Cookie_Monster, @Drago_Meh, @Maniklas, @McJagger, Gibbs, Abby. I am r a i n b o w ! ! plz click them!>>>
    Adopt one today! Adopt one today! Adopt one today! Adopt one today! Adopt one today! Adopt one today! Adopt one today!
  • CalamityCalamity Posts: 14,798Member, Friendly ✭✭✭✭✭
    Good luck xd


  • gneratororgneratoror Posts: 131Member ✭✭
    And how do i get it to load in neverending from legacy, i have never made a mod for anything
    "First off, you should read my name again." -Uiomanca[n]t
    RPG Stats http://pastebin.com/biggveJk
    I am no way profesional
  • CalamityCalamity Posts: 14,798Member, Friendly ✭✭✭✭✭
    Try copying the pastebin link?


  • gneratororgneratoror Posts: 131Member ✭✭
    edited March 29
    Calamity said:

    Try copying the pastebin link?

    nope, neithe that one nor the link, nor just the ID, nor adding .js
    I think we will need to use GitHub, but i feel too young.

    Post edited by gneratoror on
    "First off, you should read my name again." -Uiomanca[n]t
    RPG Stats http://pastebin.com/biggveJk
    I am no way profesional
  • CalamityCalamity Posts: 14,798Member, Friendly ✭✭✭✭✭
    Try a site that allows you to host JS files?


  • gneratororgneratoror Posts: 131Member ✭✭
    Yeah, pretty much the idea, will keep you updated
    "First off, you should read my name again." -Uiomanca[n]t
    RPG Stats http://pastebin.com/biggveJk
    I am no way profesional
  • gneratororgneratoror Posts: 131Member ✭✭
    For the ones who knows javascript+ JQuerry, and want to know the name of stuff:
    http://orteil.dashnet.org/legacy/main.js?v=13
    Peppers:
    http://orteil.dashnet.org/legacy/img/spicyModIconSheet.png
    And CCS:
    http://orteil.dashnet.org/legacy/style.css?v=13
    "First off, you should read my name again." -Uiomanca[n]t
    RPG Stats http://pastebin.com/biggveJk
    I am no way profesional
  • gneratororgneratoror Posts: 131Member ✭✭
    edited April 2
    The mod worked, and became mod.js, ugh, i need to mak a new mod manifest
    EDIT:
    Enough of multiposting, my test mod is done (Missing lot of stuff, may never update):
    https://rawgit.com/Generatoror/hello-world/master/cookieLegacy.js
    For GitHub users, use rawgit.com like this:
    https://rawgit.com/[username]/[repository]/[branch]/[filename].js
    Post edited by gneratoror on
    "First off, you should read my name again." -Uiomanca[n]t
    RPG Stats http://pastebin.com/biggveJk
    I am no way profesional
  • CalamityCalamity Posts: 14,798Member, Friendly ✭✭✭✭✭
    Have you found out how to create new units yet?


  • gneratororgneratoror Posts: 131Member ✭✭
    edited April 2
    Yeah of course, the same way as everything else "new G.unit" if you are not sure about how to abreviate somethuing look into data.js
    Speciffically here is an example:

    Also "//" means nothing happens there, it is for writing some message or notee, or unabling something buggy.
    new G.Unit({
    name:'gatherer',
    startWith:5, <----This is ussually not needed<br /> desc:'@forages for basic [food], [water] and [archaic building materials,Various interesting things]<>A vital part of an early tribe, [gatherer]s venture in the wilderness to gather food, wood, and other things of note.', <----description, always start with "@"<br /> icon:[0,2], <---coordinates for the icon on the stylesheet upon certain num of pixels<br /> cost:{}, <--- duh, put in some resource kind<br /> use:{'worker':1}, <--- what it needs<br /> //upkeep:{'food':0.2}, <--ignore<br /> //alternateUpkeep:{'food':'spoiled food'},<--ignoore<br /> effects:[
    {type:'gather',context:'gather',amount:2,max:4},//,multMax:{'leather pouches':1.1}//TODO
    //{type:'gather',context:'gather',what:{'water':1,'muddy water':1},amount:1,max:3,req:{'gathering focus':'water'}},
    {type:'gather',context:'gather',what:{'water':1,'muddy water':1},amount:1,max:3},
    {type:'gather',context:'gather',what:{'herb':0.5,'fruit':0.5},amount:1,max:1,req:{'plant lore':true}},
    {type:'addFree',what:{'worker':0.1},req:{'scavenging':true}},
    {type:'mult',value:1.2,req:{'harvest rituals':'on'}}
    ],
    req:{'tribalism':true},
    category:'production',
    priority:10,
    });

    UPDATE, now mod has sprites
    Post edited by gneratoror on
    "First off, you should read my name again." -Uiomanca[n]t
    RPG Stats http://pastebin.com/biggveJk
    I am no way profesional
Sign In or Register to comment.