General Discussions

Page 1 of 1
Signup or Login to Post
Might and Magic assistance - coding
  • Current rank: 1 Star. Next Rank at 100 Posts.
    Send a message to akeller1862
    ELITE
    akeller1862 posted on Jul 14, 2014 5:50:26 PM - Report post
     
    I'm trying to modify a bunch of small things in Might and Magic 6 and 7 by using the MMExtension mod, (sites.google.com/site/sergroj/mm/mmextension) which uses the lua language. I don't know it myself, and while I'm trying to teach it to myself I'm wondering if someone who knows the lanaguage could help with some things.

    MM6

    I would like to change the skills some of the guilds teach, specifically adding learning to the element guild skills and meditation to the self guild skills. Also, I'm interested in making Bootleg Bay a town portal destination, and to take away the minus five of the opposite statistics with the black potions. I would also like to modify the spellbooks in the chests you get from defeating Q in 6 to random light spellbooks in one and random dark spellbooks in the other, and to make the Inferno spellbook you sometimes get in the NWC dungeon a Lloyd's Beacon or Town Portal (random chance of both.)

    MM7

    I would like to change the training time so it's always one week, like in the other games, to make the game pedestal on Emerald Isle reset when the town does (like with the other ones in the game) and change the red potion for a hat reward so it's gold instead of the hat.
  • Current rank: 3.5 Stars. Next Rank at 8000 Posts.
    Send a message to DABhand
    PHAT CAT
    DABhand posted on Jul 15, 2014 1:01:32 PM - Report post
     
    LUA is really not that difficult its semi C++ and semi VB.

    If you grab a few LUA files out there and have a look (if they aren't encoded first of course) and look at the structure and how it works, you will probably learn it faster that way than from a book.

    Here is a not so bad quick reference

    tylerneylon.com/a/learn-lua/

    Hope you do well
    Oh and Don't forget some tuts on ASM and defeating DMA

    Clicky Here for them
  • Current rank: 1 Star. Next Rank at 100 Posts.
    Send a message to akeller1862
    ELITE
    akeller1862 posted on Jul 15, 2014 1:47:08 PM - Report post
     
    Thanks. It does look like VB, which I've worked with before.
  • Current rank: 1 Star. Next Rank at 100 Posts.
    Send a message to akeller1862
    ELITE
    akeller1862 posted on Jul 21, 2014 10:37:00 AM - Report post
     
    I'm slowly learning the language, and am trying out a few minor things in it, just to get the feel of it. I'm currently trying to change the giving of the lute on Emerald Isle to add a reputation increase (subtraction in this game). This is what I have, but I'm still trying to figure out some of the end codes. Any help?

    evt.Global = 13
    evt.Player = evt.Players.All if not evt.Cmp(evt.Value.Gold, 500) then
    return evt.SetMessage(38) = "It would help if you had the 500 gold pieces. Please don't try and cheat me out of my instrument."
    end

    evt.Subtract(evt.Value.Gold, 500)
    evt.GiveItem(632)
    return evt.SetMessage(37) = "Well, promise to at least take care of it and not use it for firewood. I suppose I'll have to make do without an instrument for the rest of this trip. Maybe I should tell stories instead of sing until I get back home."
    evt.SetNPCItem.NPC(4), 632, On = false
    evt.Subtract(evt.Value.ReputationIs, 5)
    evt.Set.NPCTopic(4)

    end
  • Current rank: 3.5 Stars. Next Rank at 8000 Posts.
    Send a message to DABhand
    PHAT CAT
    DABhand posted on Jul 21, 2014 10:42:32 AM - Report post
     
    Oh MM6 or 7.

    I don't have both of them, so dunno how the variables are etc.

    But to me changing the 5 in the ReputationIs line sounds like the correct thing.

    Or is it more a general question about the end stuff?

    [Edited by DABhand, 7/21/2014 10:44:14 AM]
    Oh and Don't forget some tuts on ASM and defeating DMA

    Clicky Here for them
  • Current rank: 1 Star. Next Rank at 100 Posts.
    Send a message to akeller1862
    ELITE
    akeller1862 posted on Jul 21, 2014 12:37:51 PM - Report post
     
    I'm hoping that someone more familiar with the coding language can pick at it to see if I've messed up the syntax. (This site has some of the commands you can use: sites.google.com/site/sergroj/mm/mmextension)
Page 1 of 1
Signup or Login to Post
All times are (GMT -06:00) Central Time (US & Canada). Current time is 2:18:50 AM