~ Forums of Enroth ~

An Enroth diehard fan community
 
HomeHome  ChatChat  FAQFAQ  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» Heroes III: The Succession Wars 10th Anniversary
by Graion Dilach 2018-11-09, 05:52

» [Ironfist ver 1.3.0] Bugs with info of spells
by Darmani 2018-11-06, 13:43

» Paul Romero - Russian Tour September 2018
by GodRage 2018-11-06, 05:17

» H3SW: General Graphics discussion
by GodRage 2018-11-06, 05:09

» H1 Masquerade by Morglin
by GodRage 2018-11-06, 04:59

» [PL, EN] 20+ new XL scenarios from Huntka!
by Uhm 2018-11-04, 02:50

» [Ironfist ver 1.3.0+] Bug with fonction OnLocationVisit(type, x, y)
by Unknown_Hero 2018-10-16, 23:49

Poll
"Wait" in HoMM2?
Yes
80%
 80% [ 55 ]
No
20%
 20% [ 14 ]
Total Votes : 69
Most Viewed Topics
H3SW: General Graphics discussion
Ragoon's Graphics For HoMM3SW
H3SW General Discussion
H3SW: Dwelling Development
H3SW Map List: Work in progress
Heroes of Might and Magic 3: The Succession Wars - General info & Announcements
Welcome fellow Enrothians!
Enrothian Fan Art
Commanders?
H3SW Recruitment Point - Enroth Needs You!

Share | 
 

 Advanced Dialogue Boxes in Project Ironfist

Go down 
AuthorMessage
DarkAtom
Skeleton
Skeleton
avatar

Messages : 9
Quality Points : 1
Registration Date : 2018-02-27

PostSubject: Advanced Dialogue Boxes in Project Ironfist   2018-07-03, 04:32

I wasn't able to find this information on the wiki, so I tried a lot of scripts (regarding the dialogue boxes) myself, and this is what I found:

The command described in the wiki is actually provided by the AdvMessageBox.lua module. But the actual command, without the module, is explained here:

Syntax:
AdvancedMessageBox(text, dialogtype, position1, position2, img1type, img1arg, img2type, img2arg, ???, ???)

text: A string or a variable that contains a string to be displayed
dialogtype: An integer (will be explained below)
position1 and position2: integers, but I still didn't fully discover them; for now, put -1 for both of them to get a centered window
imgtype and imgarg: The image parameters will be explained below.
???: As for the last 2 ??? parameters, I never found a use for them, maybe they were meant to be the arguments for a 3rd picture? (although I have never seen a 3 picture dialogue in the game). Just to be safe, leave these 2 set to -1 and 0, respectively.

Dialogue types:

  • 0 or anything below 0: A window with no buttons, can't get rid of it
  • 1: A window with an OK button
  • 2: A window with Yes/No buttons
  • 3: A window with a Cancel button
  • 4: A window with no buttons, can get rid of it by clicking anywhere (this is probably for right-clicks)
  • 5: Same as 1
  • 6: Same as 3
  • 7: A window with 2 'Learn' buttons (like in the level-up screen)
  • 8: A window with a 'Learn' button on the left and nothing on the right
  • 9 and above: Same as 0


Image types:

  • -1: No image
  • 0: Wood
  • 1: Mercury
  • 2: Ore
  • 3: Sulfur
  • 4: Crystal
  • 5: Gems
  • 6: Gold
  • 7: Artifact
  • 8: Spell
  • 9: Player color
  • 10: Good Luck
  • 11: Bad Luck
  • 12: Good Morale
  • 13: Bad Morale
  • 14: Experience
  • 15: Hero Portrait
  • 16: Not used (if you use it, game will freeze/crash)
  • 17: Secondary Skill
  • 18: Creature
  • 19-24: Same as -1
  • 25: Primary Skill
  • 26+: Same as 16


Image subtypes (the number in the list represents the type for which the subtype applies)

  • -1: Put 0 to be safe
  • 0: Quantity (if you put 0 it will not show any number)
  • 1: Quantity (if you put 0 it will not show any number)
  • 2: Quantity (if you put 0 it will not show any number)
  • 3: Quantity (if you put 0 it will not show any number)
  • 4: Quantity (if you put 0 it will not show any number)
  • 5: Quantity (if you put 0 it will not show any number)
  • 6: Quantity (if you put 0 it will not show any number)
  • 7: Which artifact (use artifact name from the wiki)
  • 8: Which spell (use spell name from the wik8)
  • 9: Which color (blue-0, green-1, red-2, yellow-3, orange-4, purple-5)
  • 10: Doesn't matter
  • 11: Doesn't matter
  • 12: Doesn't matter
  • 13: Doesn't matter
  • 14: Quantity (works with negatives as well)
  • 15: Which portrait (start from 0, it's the same order as when you scroll through them in the editor)**
  • 16: As I said above, game crashes, so don't use it
  • 17: Which skill (look at the asterisk below)
  • 18: Which creature (take their ID from \data\creatures.xml)
  • 19-24: Put 0 to be safe
  • 25: 0-3 (Attack, Defense, Spell Power, Knowledge) (100-103 displays a +1 skill)
  • 26+: Don't use it


*count the skills in the order from the wiki starting from 0 and stop at the one desired. Then multiply by 3 to get the basic picture. Add 1 for advanced, or 2 for expert  Smile
**for hero portraits: to display town captains, use 90-95 (knight, barbarian, sorceress, warlock, wizard, necromancer)

One more thing I have to mention: If you choose image type resource (0-6), you can set the subtype as negative and it will show the qty/day thing like from the mines. So if I set it to -6, for example, the message will show 6/day.
UPDATE: If you want to show negative values (like when taking resources), put the subtype -x-100000, where x is the value. So -100050 would show -50. If you put exactly -100000, it shows 100k/day, not -0.

I hope this was helpful, but it is still not complete, as I still have to see what does the function return for each dialogue type Very Happy


Last edited by DarkAtom on 2018-09-30, 20:21; edited 1 time in total
Back to top Go down
Darmani
Master Modder
Master Modder
avatar

Messages : 189
Quality Points : 38
Registration Date : 2014-12-27

PostSubject: Re: Advanced Dialogue Boxes in Project Ironfist   2018-09-04, 18:19

Woah; this is awesome. Nice work! Thanks for the reminder that we need to finish our project to document this.
Back to top Go down
 
Advanced Dialogue Boxes in Project Ironfist
Back to top 
Page 1 of 1
 Similar topics
-
» Project Runway
» Ammo boxes
» Cajas Raras y flores - Doll house - Eigentijos Origami -Faboluos Origami Boxes
» [ABA] Clan The Official Project Reality Clan of the British
» 3 WW2 Canadian Red Cross POW Boxes

Permissions in this forum:You cannot reply to topics in this forum
~ Forums of Enroth ~ :: Modding Guild :: Heroes of Might and Magic II: Project Ironfist :: Modding and Mapmaking-
Jump to: