MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).
motter25420
Leprechaun
Leprechaun
Posts: 30
Joined: 04 Feb 2017

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby motter25420 » 15 Apr 2017, 15:16

Grayface I have started to "translate" all the .evt files that you extracted into the language that will be recognized by your patch (I will make this available to you to add to your files if you like) but I have a few questions:

1. I guess most important - has someone already done this? If it's already been done I'd hate to do all that work for nothing.

2. As I said before, it's been several years and I've forgotten a lot of stuff, so I noticed in one of the E-mails you sent me back then you said I only need to install your patch, then I can create the "Datafile" folder and place my modded files in there, is that correct?

3. I do remember I had just begun experimenting with that and it was working but my question then is if all I need is the patch what is MMExtension for and where do I need to place those files after I extract them? Do I need to take those .dll files out of the folders or leave them?

4. One final thing (I'm a pain I know) I have been using your MMArchive to do most of my modding, however when I try to open up .bin files or .evt files with it nothing is shown. I can still use MM8lvleditor for these but it takes a lot longer, so do I have an older version or am I doing something wrong?

I am pretty sure I downloaded the most recent version but I could be wrong.

Thanks again for all your hard work.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1660
Joined: 29 Nov 2005

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 15 Apr 2017, 15:49

motter25420 wrote:1. I guess most important - has someone already done this?
Yes. I've made a relatively sophisticated decompiler for that: https://www.dropbox.com/s/kznafxub3lcbr ... s.rar?dl=0
motter25420 wrote:2. As I said before, it's been several years and I've forgotten a lot of stuff, so I noticed in one of the E-mails you sent me back then you said I only need to install your patch, then I can create the "Datafile" folder and place my modded files in there, is that correct?
Yes, it's a feature of my patch. DataFiles folder is for modified *.txt tables primarily.
motter25420 wrote: 3. I do remember I had just begun experimenting with that and it was working but my question then is if all I need is the patch what is MMExtension for and where do I need to place those files after I extract them? Do I need to take those .dll files out of the folders or leave them?
Extract them into game folder.
motter25420 wrote: 4. One final thing (I'm a pain I know) I have been using your MMArchive to do most of my modding, however when I try to open up .bin files or .evt files with it nothing is shown. I can still use MM8lvleditor for these but it takes a lot longer, so do I have an older version or am I doing something wrong?
To edit *.evt files I made 010Editor templates back in the day. If you want, I'll upload them.
motter25420 wrote: I am pretty sure I downloaded the most recent version but I could be wrong.
To be sure: https://www.dropbox.com/s/qohxt8ijjh74m ... p.rar?dl=0
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

motter25420
Leprechaun
Leprechaun
Posts: 30
Joined: 04 Feb 2017

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby motter25420 » 15 Apr 2017, 21:12

Good Deal. Thanks. Glad I didn't get too far with translating the scripts, would have been a ton of work for no reason :)
Last edited by motter25420 on 15 Apr 2017, 21:12, edited 1 time in total.

motter25420
Leprechaun
Leprechaun
Posts: 30
Joined: 04 Feb 2017

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby motter25420 » 15 Apr 2017, 23:11

Spoke too soon, I already had those extracted .txt files from before, I was referring to when we spoke here and you told me the extracted .txt files will not work if I place them in the datafiles folder because the commands are different and I had to rewrite them:
For example,

event 101
0: Cmp {VarNum.QBits, Value = 300, jump = 7}
1: Player = Players.All
2: Cmp {VarNum.Inventory, Value = 489, jump = 5} -- "Key to Goblinwatch"
3: StatusText {Str = 18} -- "The door is locked."
4: Exit {}

5: Subtract {VarNum.Inventory, Value = 489} -- "Key to Goblinwatch"
6: Set {VarNum.QBits, Value = 300}
7: MoveToMap {X = 601, Y = 6871, Z = 177, Direction = 1400, LookAngle = 0, SpeedZ = 0, HouseId = 171, Icon = 5, Name = "D01.blv"} -- "Goblinwatch"
8: Exit {}

9: EnterHouse {Id = 171} -- "Goblinwatch"
end


may look like this as MMExtension script:

evt.house[101] = 171 -- name of this house is "Goblinwatch" and it will be used as hint. EnterHouse command in the end of decompiled script has the same meaning.
evt.map[101] = function()
if not evt.Cmp(evt.VarNum.QBits, 300) then
evt.Player = evt.Players.All
if not evt.Cmp(evt.VarNum.Inventory, 489) then -- "Key to Goblinwatch"
return evt.StatusText(18) -- "The door is locked."
end
evt.Subtract(evt.VarNum.Inventory, 489) -- "Key to Goblinwatch"
evt.Set(evt.VarNum.QBits, 300)
end
evt.MoveToMap{X = 601, Y = 6871, Z = 177, Direction = 1400, LookAngle = 0, SpeedZ = 0, HouseId = 171, Icon = 5, Name = "D01.blv"} -- "Goblinwatch"
end
Then I asked you if you could do just a few evts from "Global.evt" to get me started and you gave me this:
evt.global[61] = function() -- "Council Quest"
evt.SetMessage {Str = 74} -- "I don’t have much time to talk right now– I have a lot to do. I’m in the process of organizing a few campaigns to attack the devils along the western coast. You must realize, as I do, that nothing in all of Enroth poses as much of a threat to our safety as they do. I only wish the other Lords would assist me by contributing supplies and troops, or just helping in the planning of these attacks. They spend more time bickering amongst themselves over borders and laws and trade than in helping me deal with the REAL threat. The devils have an advance post in Kriegspire near the Sentinels. From here, they are able to base small raids and gather intelligence on our forces. I need you to sneak in and attack it, find what information you can on the location of any devil strongholds and patrol patterns, and destroy the place. Do not let any of the devils escape! Surprise and secrecy are our greatest weapons."
evt.Add {"QBits", Value = 113}
evt.SetNPCTopic {NPC = 6, Index = 0, Event = 62} -- "Council Quest"
end

evt.global[62] = function() -- "Council Quest"
evt.SetPlayer("All")
if not evt.Cmp {"Inventory", Value = 506} then -- "Devil Plans"
evt.SetMessage {Str = 76} -- "Did you fail in your mission? You didn’t allow the demons to escape, did you? That post MUST be destroyed for any large attack against them to be successful. As long as that post exists, your mission still stands. "
return
end

evt.SetMessage {Str = 77} -- "Good job! With the information you’ve brought back, we now have the intelligence we need to stage an attack on the devils, and with that post out of the way, we can hit them when they won’t expect it. I give you my full support in the council– hopefully the council will actually DO something for once."
evt.Add {"Experience", Value = 40000}
evt.Add {"Awards", Value = 4}
evt.Subtract {"Inventory", Value = 506} -- "Devil Plans"
evt.Subtract {"QBits", Value = 184}
evt.SetPlayer("Current")
evt.Subtract {"QBits", Value = 113}
evt.Add {"ReputationIs", Value = 200}
evt.SetNPCTopic {NPC = 6, Index = 0, Event = 64} -- "Council Quest"
evt.SetPlayer("All")
if not evt.Cmp {"Awards", Value = 32} then
return
end
if not evt.Cmp {"Awards", Value = 2} then
return
end
if not evt.Cmp {"Awards", Value = 3} then
return
end
if not evt.Cmp {"Awards", Value = 4} then
return
end
if not evt.Cmp {"Awards", Value = 5} then
return
end
if not evt.Cmp {"Awards", Value = 6} then
return
end
if not evt.Cmp {"Awards", Value = 7} then
return
end

evt.Set {"QBits", Value = 167}
end

evt.global[64] = function() -- "Council Quest"
evt.SetMessage {Str = 78} -- "Excellent work in dispatching those devils! Again, you have my thanks. My support in the council is yours, at least until the threat of the devils is past. Hopefully you can spur the council into action. By the way, the information that you brought back has confirmed our suspicion about the enemy base. It is definitely near the town of Sweet Water in Paradise Valley."
end
So if I want to mod the .evt files in text form and place them in datafiles which commands are the correct one's to use?
Last edited by motter25420 on 15 Apr 2017, 23:13, edited 2 times in total.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 19 Apr 2017, 08:03

GrayFace wrote:
J. M. Sower wrote:Can you tell me more about IdaAddr and FR/FR1? I can understand the best on the basis of examples. ;) I can't open your databases because I have only free 5.0 version of IDA, but I have my own databases.
For example, FR(0x5E9530, 0x5E9530 + 0x60*2) would find references to monsters array in MM8 as well as some false positives (why *2? Because one function starts counting from monster 1, not monster 0). Then you and copy one of Ref{...} strings and press paste in IdaAddr. Then switch to IDA and use Ctrl+Left/Right to navigate, Ctrl+"+" to include the address, Ctrl+"-" to exclude and Ctrl+"*" to (don't remember). It simulates mouse clicks and currently coordinates are hard-coded for 125% DPI. It was never meant for release obviously :)
The Ref{} comes from WoG when I used it to find stuff to add new town (still haven't added it), I have this function there. The 2nd Ref{} that is usually empty contains more suspicious commands.
Ideal way to find things would probably be a combination of static FR() approach and debugging with a memory breakpoint.
FR(0x5E9530, 0x5E9530 + 0x60*2) give me empty Ref's. :/
Last edited by J. M. Sower on 19 Apr 2017, 08:04, edited 1 time in total.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1660
Joined: 29 Nov 2005

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 20 Apr 2017, 23:32

motter25420 wrote:So if I want to mod the .evt files in text form and place them in datafiles which commands are the correct one's to use?
No, that's impossible. To modify *.evt files you'd need my 010Editor templates. Or you can modify *.lua files and use them with MMExtension. Lua files should be placed into Scripts/Maps, except Global.lua which should be placed into Scripts/Global.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 21 Apr 2017, 14:55

Monsters Portraits script v1.0

Note: At this time it works only on MM8.

I have the honor to present you my new script that allows changing monsters portraits. It is not very professional but it works. ;) I used free space in game code that gives posibility to set maximally 207 portraits. But this is very big number because one portrait is dedicated for three levels of monster, so 207th portrait is for monsters number 619-621. Check Readme.txt for more informations.

Download: http://www.mediafire.com/file/0xfmki8ic ... t+v1.0.zip

Update: Monsters Portraits script v1.1
Download: http://www.mediafire.com/file/g1qitmmpd ... t+v1.1.zip

Screen with peasants with new portrait. ;)
Image
Last edited by J. M. Sower on 21 May 2017, 18:20, edited 5 times in total.

motter25420
Leprechaun
Leprechaun
Posts: 30
Joined: 04 Feb 2017

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby motter25420 » 21 Apr 2017, 16:04

No, that's impossible. To modify *.evt files you'd need my 010Editor templates. Or you can modify *.lua files and use them with MMExtension. Lua files should be placed into Scripts/Maps, except Global.lua which should be placed into Scripts/Global.
OK. I guess I'm still a bit confused. Is the scripting language you sent me before what I have to use for Lua? Can I modify the evt files in Lua with that language and have the game default to them?

I still know how to edit all that with hex, but it's more of a pain, it's not a big deal if I have to, but I'm still wondering tho what did you mean by this, you seem to be implying I can write scripts with MMExtension:
For example,

event 101
0: Cmp {VarNum.QBits, Value = 300, jump = 7}
1: Player = Players.All
2: Cmp {VarNum.Inventory, Value = 489, jump = 5} -- "Key to Goblinwatch"
3: StatusText {Str = 18} -- "The door is locked."
4: Exit {}

5: Subtract {VarNum.Inventory, Value = 489} -- "Key to Goblinwatch"
6: Set {VarNum.QBits, Value = 300}
7: MoveToMap {X = 601, Y = 6871, Z = 177, Direction = 1400, LookAngle = 0, SpeedZ = 0, HouseId = 171, Icon = 5, Name = "D01.blv"} -- "Goblinwatch"
8: Exit {}

9: EnterHouse {Id = 171} -- "Goblinwatch"
end


may look like this as MMExtension script:

evt.house[101] = 171 -- name of this house is "Goblinwatch" and it will be used as hint. EnterHouse command in the end of decompiled script has the same meaning.
evt.map[101] = function()
if not evt.Cmp(evt.VarNum.QBits, 300) then
evt.Player = evt.Players.All
if not evt.Cmp(evt.VarNum.Inventory, 489) then -- "Key to Goblinwatch"
return evt.StatusText(18) -- "The door is locked."
end
evt.Subtract(evt.VarNum.Inventory, 489) -- "Key to Goblinwatch"
evt.Set(evt.VarNum.QBits, 300)
end
evt.MoveToMap{X = 601, Y = 6871, Z = 177, Direction = 1400, LookAngle = 0, SpeedZ = 0, HouseId = 171, Icon = 5, Name = "D01.blv"} -- "Goblinwatch"
end
_________________________________________________________________________________ I started to rewrite your extracted scripts, here's the Humphrey events so far, could I put this in lua then place it in the scripts/global folder and make changes to it?
_________________________________________________________________________________
evt.global[10] = function() -- "Lord Kilburn"
evt.SetMessage {Str = 13} -- "<Wilbur snaps his fingers> Say, you wouldn’t happen to be interested in taking care of a little detail for me, would you? Lord Kilburn disappeared near Blackshire. Find out what you can and return to me with the information. If it is true that he has been slain by devils, return his shield to me if at all possible. I will grant you my favor with the High Council, should you require it, and you can rest assured your compensation will be generous."
evt.Add {"QBits", Value = 86}
evt.SetNPCTopic {NPC = 4, Index = 0, Event = 11} -- "Lord Kilburn"
end

evt.global[11] = function() -- "Lord Kilburn"
evt.SetPlayer("All")
if not evt.Cmp {"Inventory", Value = 499} then -- "Lord Kilburn's Shield"
evt.SetMessage {Str = 76} -- "Hmm. No luck finding the shield yet, eh? Well, do keep looking, will you? It really is important that someone accounts for his whereabouts."
return
end

evt.SetMessage {Str = 16} -- "Ah. ‘Tis a sad day when so noble a Knight should fall to such foul monsters! You have done a good thing, bringing his shield to me. I shall ensure that he and his men receive all the honors due them. I am in your debt, and you have my favor with the council. Here is your reward."
evt.Add {"Experience", Value = 40000}
evt.Add {"Awards", Value = 2}
evt.Subtract {"QBits", Value = 182}
evt.SetPlayer("Current")
evt.Subtract {"QBits", Value = 86}
evt.Add {"ReputationIs", Value = 200}
evt.Add {"Gold", Value = 5000}
evt.SetNPCTopic {NPC = 4, Index = 0, Event = 12} -- "The High Council"
evt.SetPlayer("All")
if not evt.Cmp {"Awards", Value = 32} then
return
end
if not evt.Cmp {"Awards", Value = 2} then
return
end
if not evt.Cmp {"Awards", Value = 3} then
return
end
if not evt.Cmp {"Awards", Value = 4} then
return
end
if not evt.Cmp {"Awards", Value = 5} then
return
end
if not evt.Cmp {"Awards", Value = 6} then
return
end
if not evt.Cmp {"Awards", Value = 7} then
return
end

evt.Set {"QBits", Value = 167}
end

evt.global[12] = function() -- "The High Council"
if not evt.Cmp {"Awards", Value = 32} then
evt.SetMessage {Str = 17} -- "Well, you have my vote on the High Council. I trust you implicitly. I've sent a messenger instructing Slicker Silvertongue to vote for you on my behalf. Now I'm quite busy, and must attend to other duties. I'm sure you can take care of any problems and miscommunications that may arise in this matter. Yes. Quite right."
return
end
evt.SetMessage {Str = 18} -- "I cannot thank you enough for uncovering that horrible traitor and his crimes against the throne. I understand you are on a mission of some importance, so for Services Rendered to the Crown, it behooves me to offer you free use of the royal yacht for your travels. It will take you as far as Hermit's Isle, if you need it to. Once again, thank you!"
end

evt.global[13] = function() -- "Crusaders"
evt.Add {"QBits", Value = 188}
evt.SetNPCTopic {NPC = 4, Index = 1, Event = 14} -- "Crusaders"
evt.SetMessage {Str = 19} -- "I am the Foremost Paladin, and as such, I am the one charged with the promotion and keeping of the titles and responsibilities of paladinhood. Those paladins who wish to perform a quest for the official promotion to crusader must rescue a damsel in distress. Those of you who are not paladins will be awarded the title of honorary crusader, and all will be given a sizeable gold reward. Return to me with said damsel and I will promote any paladins aiding in her rescue to the status of crusader."
end

evt.global[14] = function() -- "Crusaders"
if not evt.Cmp {"NPCs", Value = 11} then -- "Melody Silver"
evt.SetMessage {Str = 20} -- "I know there is a shortage of damsels in distress, but this quest is the traditional test. I really can’t bend the rules here. Keep looking– I’m sure you’ll find someone. If it helps, I hear Melody Silver, daughter of the noble John Silver, is being held captive by ruffians on the Island of Mist."
return
end
evt.SetMessage {Str = 21} -- "I have heard stories of the daring rescue, and I am delighted that you have returned with Miss Silver. I shall arrange to have her returned to her family at once. Exemplary work! I hereby officially promote all paladins to the status of crusader, and all non-paladins to honorary crusaders!"
evt.Subtract {VarNum.QBits, Value = 88}
evt.Subtract {VarNum.NPCs, Value = 11}
evt.Add {"ReputationIs", Value = 50}
evt.SetPlayer("All")
evt.Add {"Experience", Value = 15000}
evt.SetPlayer(0)
if not evt.Cmp {"ClassIs", Value = 9} then -- "Paladin"
evt.Add {"Awards", Value = 9}
else
evt.Set {"ClassIs", Value = 10} -- "Crusader"
evt.Add {"Awards", Value = 8}
end

evt.SetPlayer(1)
if not evt.Cmp {"ClassIs", Value = 9} then -- "Paladin"
evt.Add {"Awards", Value = 9}
else
evt.Set {"ClassIs", Value = 10} -- "Cavalier"
evt.Add {"Awards", Value = 8}
end

evt.SetPlayer(2)
if not evt.Cmp {"ClassIs", Value = 9} then -- "Paladin"
evt.Add {"Awards", Value = 9}
else
evt.Set {"ClassIs", Value = 10} -- "Crusader"
evt.Add {"Awards", Value = 8}
end

evt.SetPlayer(3)
if not evt.Cmp {"ClassIs", Value = 0} then -- "Paladin"
evt.Add {"Awards", Value = 17}
else
evt.Set {"ClassIs", Value = 10} -- "Crusader"
evt.Add {"Awards", Value = 8}
end

evt.SetNPCTopic {NPC = 4, Index = 1, Event = 15} -- "Heroes"
end

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1660
Joined: 29 Nov 2005

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 21 Apr 2017, 16:42

motter25420 wrote:OK. I guess I'm still a bit confused. Is the scripting language you sent me before what I have to use for Lua? Can I modify the evt files in Lua with that language and have the game default to them?
These *.lua scripts are executed by MMExt. Just edit these scripts however you like. Your mod would require MMExt to run. Game.MapEvtLines.Count = 0 at the beginning of them disables whole corresponding standard .evt file. When making a smaller mod it's better to change only particular events in a map, disabling standard code of them by Game.MapEvtLines:RemoveEvent(101). Here 101 is the event number.
Like I said, all the rewriting is already done automatically, just use *.lua files from https://www.dropbox.com/s/kznafxub3lcbr ... s.rar?dl=0
Last edited by GrayFace on 21 Apr 2017, 16:43, edited 1 time in total.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

motter25420
Leprechaun
Leprechaun
Posts: 30
Joined: 04 Feb 2017

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby motter25420 » 21 Apr 2017, 17:30

OK thanks, I'll figure it out, thing is I know had this working back in the day, wish I had made notes. Are you still planning to upload this:
To edit *.evt files I made 010Editor templates back in the day. If you want, I'll upload them.

Going off topic, and I'm kinda nervous to ask, is Big Daddy still around? I know last time I talked to him he was having health problems. Have you heard anything?
Last edited by motter25420 on 21 Apr 2017, 17:34, edited 2 times in total.

Rodril
Swordsman
Swordsman
Posts: 579
Joined: 18 Nov 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Rodril » 22 Apr 2017, 06:37

J. M. Sower wrote:Monsters Portraits script v1.0
Hello, it is awesome!
Would be great to add all this mon*** to array instead of individual variables and read it from memory at first launch to get defaults. Maybe it should be unloaded to another .txt table in datatables folder and loaded into memory each launch? Also look at function StaticAlloc(X) it signing free space in memory of size X (in bytes) and returning you pointer to start of it, then pointers from .exe can be replaced, and this table becoming unlimited, just need to compute right size of alloc memory, but it seems easy if number of pics and lines in hostile.txt is equal, just need to put your code in some event (like gameInitializated2), where hostile.txt already loaded, and it's size can be recieved from Game.HostileTxt.count .

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 22 Apr 2017, 07:13

Rodril wrote:
J. M. Sower wrote:Monsters Portraits script v1.0
Hello, it is awesome!
Would be great to add all this mon*** to array instead of individual variables and read it from memory at first launch to get defaults. Maybe it should be unloaded to another .txt table in datatables folder and loaded into memory each launch? Also look at function StaticAlloc(X) it signing free space in memory of size X (in bytes) and returning you pointer to start of it, then pointers from .exe can be replaced, and this table becoming unlimited, just need to compute right size of alloc memory, but it seems easy if number of pics and lines in hostile.txt is equal, just need to put your code in some event (like gameInitializated2), where hostile.txt already loaded, and it's size can be recieved from Game.HostileTxt.count .
Your propositions sounds good, but at this time I don't have good enough skill to do it. ;) I still need to learn many things.

I wonder if there is posibility to make command for changing portraits from game level.
Last edited by J. M. Sower on 22 Apr 2017, 07:22, edited 3 times in total.

Vaoe
Lurker
Lurker
Posts: 2
Joined: 22 Apr 2017

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Vaoe » 22 Apr 2017, 10:11

Few things, first this is very impressive and I'm having a lot of fun learning how it works.

Seems there is some activity at the moment and perhaps that answers my question, but the links to quest examples and a few other things on Grayface's page seems to not be working, the files it says are missing. I'd like to play around with quests but not sure where to begin.

Also, if I could get a few pointers on doing the following (if its possible) that'd be really great.
- Can you somehow disable the Dragon class' breath weapon attack? (I would like to replace it with a new class setup altogether but weapon and range attacks default to breath weapon regardless of equipment and skill.)

-Is it possible to swap spells around the spellbooks (random example, swap Wizard Eye from Air to Torch in Fire and have Wizard Eye be governed by Fire Skill and Torch governed by the Air skill.) or simply change which spell skill governs which spell (regardless of what spell book it is in, this seems 'easier' but maybe not possible).

Thanks again, very impressive tools Grayface.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1660
Joined: 29 Nov 2005

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 24 Apr 2017, 00:53

Here are current quest examples: https://www.dropbox.com/s/go2fp1g5rqi8f ... s.rar?dl=0
Tell me if some of them don't work. I've made changes to MMExt since that Tmp version I uploaded.
Put all of them into Scripts\Global. Start examining with "Quest Example Simple", then "Quest Example".
motter25420 wrote:OK thanks, I'll figure it out, thing is I know had this working back in the day, wish I had made notes. Are you still planning to upload this:
To edit *.evt files I made 010Editor templates back in the day. If you want, I'll upload them.
https://www.dropbox.com/s/x8d1tcynu83wb ... s.rar?dl=0
motter25420 wrote: Going off topic, and I'm kinda nervous to ask, is Big Daddy still around? I know last time I talked to him he was having health problems. Have you heard anything?
I don't know, he quit this forum and I haven't visited TELP in years.
Last edited by GrayFace on 24 Apr 2017, 01:13, edited 1 time in total.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

dark templar
Leprechaun
Leprechaun
Posts: 11
Joined: 28 Nov 2015

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby dark templar » 24 Apr 2017, 06:54

GrayFace wrote:(from another thread)
Echo wrote: EDIT2: and since I'm already asking questions I might not get answered - is there a way to change values of enchantments? For example, to make Of the Gods one give say +30 stats instead of +10? I had hopes for the table that lists those, but it doesn't actually allow to change them.
It is possible like this: (haven't checked it in game)

Code: Select all

function events.CalcStatBonusByItems(t)
  if t.Stat >= const.Stats.Might and t.Stat <= const.Stats.Luck then
    for it in t.Player:EnumActiveItems() do
      if it.Bonus2 == 2 then
        t.Result = t.Result + 20
      end
    end
  end
end
Hi GrayFace:

I test the script and it works properly.If I want to enhance the "of protection"(+10 to all 4 Resistances) like increase to +20,how to do that?

I have tried the below but it seems not work.

Code: Select all

function events.CalcStatBonusByItems(t)
  if t.Stat >= const.Stats.FireResistance and t.Stat <= const.Stats.BodyResistance then
    for it in t.Player:EnumActiveItems() do
      if it.Bonus2 == 2 then
        t.Result = t.Result + 10
      end
    end
  end
end
[/quote]

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 24 Apr 2017, 12:07

GrayFace wrote:Here are current quest examples: https://www.dropbox.com/s/go2fp1g5rqi8f ... s.rar?dl=0
Tell me if some of them don't work. I've made changes to MMExt since that Tmp version I uploaded.
I have that script for quest and it crashes when I click on quest topic with quest item in inventory (I have MMExt 2.2 tmp).

Code: Select all

local A, B, C, D, E, F = 0, 1, 2, 3, 4, 5
local Q = vars.Quests

QuestNPC = 34  -- Tom White

Quest{
	"ExampleQuest",
	Slot = C,
	Quest = 135,  -- the number of quest in quests.txt to use
	Texts = {

		Topic = "Misja",
		Give = "W południowej strażnicy pracował mój ojciec. Cieszył się tam wysokim, dobrze opłacanym stanowiskiem. Ehhh... a ja teraz ledwie wiążę koniec z końcem. \n \n Nie proszę was o odnalezienie jego szczątków w celu pochówku, gdyż i tak mnie na to nie stać, a i cmentarz jest teraz przecież nawiedzony. Jednak jeśli odważylibyście się odwiedzić tamto miejsce to rozejrzyjcie się za pewnym świetnie wykonanym sztyletem. To była moja rodzinna pamiątka, jeszcze z czasów przed Ciszą! Rozpoznacie go bez problemu. Sztylet ten nigdy nie rdzewiał i nie tępiał!",

		GreetGiven = "Czy znaleźliście już mój sztylet?",
		Done = "Znaleźliście mój rodzinny sztylet!  Proszę przyjmijcie tę nagrodę za waszą pomoc!",
		Undone = "Szukaj dalej! Powinien znajdować się gdzieś pod południową Strażnicą.",

		GreetDone = "Miło cię znowu widzieć. ",
		TopicDone = "Misja",
		After = "Ponowne dzięki!",
		
		Quest = "Odnajdź Sztylet Rodzinny Toma White, który powinien znajdować się w Strażnicach Górniczego wybrzeża.",
	},
	QuestItem = 30,  -- item index. original 652 "Prophecies of the Snake"
	Gold = 500,  -- reward: gold
	Exp = 750,  -- reward: experience
	Awards = 2,
}
Here is the bug:

Code: Select all

Scripts/Core/EventsList.lua:68: ...and Magic VIII moded\Scripts\Structs\After\Functions.lua:147: attempt to call field 'Sub' (a nil value)

stack traceback:
	...and Magic VIII moded\Scripts\Structs\After\Functions.lua: in function 'TakeItemFromParty'
	...II moded\Scripts\Structs\After\LocalizationAndQuests.lua:564: in function <...II moded\Scripts\Structs\After\LocalizationAndQuests.lua:543>

arguments of 'TakeItemFromParty':
	(*temporary) = 30
	(*temporary) = nil

local variables of 'TakeItemFromParty':
	(*temporary) = 0
	(*temporary) = 0
	(*temporary) = 1
	(*temporary) = 0
	(*temporary) = nil
	(*temporary) = "Inventory"
	(*temporary) = 30
	(*temporary) = 5.7334722921194e-313
	(*temporary) = "attempt to call field 'Sub' (a nil value)"

stack traceback:
	[builtin#19]: at 0x03f05960
	...II moded\Scripts\Structs\After\LocalizationAndQuests.lua:319: in function 'v'
	Scripts/Core/EventsList.lua:68: in function <Scripts/Core/EventsList.lua:63>

arguments of 'v':
	evtId = 997
	seq = 0

local variables of 'v':
	t = (table: 0x0cd67c78)

upvalues of 'v':
	CurrentNPC = 34
	CurrentQuests = (table: 0x0c923d48)
	UpdateCurrentQuests = (function: 0x0c714b60)
Last edited by J. M. Sower on 24 Apr 2017, 12:13, edited 2 times in total.

motter25420
Leprechaun
Leprechaun
Posts: 30
Joined: 04 Feb 2017

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby motter25420 » 24 Apr 2017, 19:47

GrayFace wrote:Here are current quest examples: https://www.dropbox.com/s/go2fp1g5rqi8f ... s.rar?dl=0
Tell me if some of them don't work. I've made changes to MMExt since that Tmp version I uploaded.
Put all of them into Scripts\Global. Start examining with "Quest Example Simple", then "Quest Example".
motter25420 wrote:OK thanks, I'll figure it out, thing is I know had this working back in the day, wish I had made notes. Are you still planning to upload this:
To edit *.evt files I made 010Editor templates back in the day. If you want, I'll upload them.
https://www.dropbox.com/s/x8d1tcynu83wb ... s.rar?dl=0
motter25420 wrote: Going off topic, and I'm kinda nervous to ask, is Big Daddy still around? I know last time I talked to him he was having health problems. Have you heard anything?
I don't know, he quit this forum and I haven't visited TELP in years.
I've made changes to MMExt since that Tmp version I uploaded.


So do I have an outdated version?

I've actually figured this version out and it's been working great, but if there's a better version I'm all for it,

I'm just editing the evt files in Lua and it's working. This is so much easier than Hex, I can't say thank you enough.

Something I noticed tho, when I look at the extracted evt files for dungeons they don't have the full info. For example, if I look at the "Temple of the Snake" scripts, there is nothing there about the hidden enemy "Q".

Now, I can start a game, go in that dungeon, and then go open up that dungeon in new.lod and there he is and I can mod him.

I know back when I was doing this before I was able to go in the dungeons, then extract that evt file from new.lod, and with hex copy the info of the character and then place it in the evt file found in icons.lod, I could edit them anyway I wanted, give them different items or HP etc.

Do I still have to do that with hex or is there another way to control and edit the special spawns in a dungeon? Can I just add a spawn in the Lua script?

dark templar
Leprechaun
Leprechaun
Posts: 11
Joined: 28 Nov 2015

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby dark templar » 25 Apr 2017, 05:50

:-D Hi GrayFace,may I ask you how to translate this script into lua?It's kind of shame that I don't even know a little bit about lua :(

Code: Select all

event 318
      Hint = str[100]  -- ""
  0:  MoveToMap  {X = -14208, Y = -6992, Z = 1344, Direction = 1024, LookAngle = 0, SpeedZ = 0, HouseId = 0, Icon = 0, Name = "0"}
end
There are two teleport plates which teleport players to the temple at the square of Bracada Desert,I want to change one of them to teleport
to the shop,so I need to add an event 318 just like above.
I appreciate anyone who can help me :-D

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 27 Apr 2017, 10:17

I noticed that mm8.exe contains some interesting dialog boxes. It looks like they are for setting coordinates for items that doesn't have posibility to edit their cords in items.txt (for example swords can be moved in items.txt but boots can't and they have dialog box visible on screen below).
Image

I found some code in Deasembler but i don't know any way to use it. What do you think? Maybe there is some way to summon that dialog boxes in game? ;|
Image
Last edited by J. M. Sower on 27 Apr 2017, 12:43, edited 1 time in total.

Emjayen
Peasant
Peasant
Posts: 53
Joined: 01 Aug 2013
Location: Sydney, Australia
Contact:

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Emjayen » 27 Apr 2017, 22:20

I found some code in Deasembler but i don't know any way to use it. What do you think? Maybe there is some way to summon that dialog boxes in game? ;|
If the dialogs are used at all, then look for calls to CreateDialogA/CreateDialogW (or possibly DialogBoxA/DialogBoxW) which are implemented in user32.dll


Return to “Might and Magic”

Who is online

Users browsing this forum: No registered users and 8 guests