Closed NiktosNOTD closed 6 years ago
For future reference instruction of adding items to shop. 1.Data Module->User Types->'ShopItems' ADD an item at end. 2.UI Module->Shop Layout->Add a button where comment indicating it is, IMPORTANT to increment number in button name. 3.Trigger Module->Inventory->New Shop->Shop Variables->increment value of 'numberOfShopOptions' constant. 4.Test->Save
Sooo, seems my last commit didn't work out like i wanted it to. It started with source tree dying on me and having to do full reinstal including setting up repositories anew, seems i messed up along the way.
Going to just close it and open new pull after i figure out what went wrong.
Old shop is left functional for now, despite extensive testing i'm not sure if new shop won't cause some issue so i suggest leaving them both online for one patch. I will make a pullrequest removing old shop in the future if this one won't cause any problems.
New shop uses layout template as base (similiar in structure to talent window) - Shop consists of tab control and two pages(Consumables-for one game items |Modifications- for lifelong purchases) Added triggers to create shop dialog, and dialog buttons that correspond to items in shop - said triggers feed data to layout template and store dialog references in Shops record structure.
changed to 2dimm array
Added usertype -'shopitems' to store shop related properties of items (name,price,icon,tooltip,type,ect) this allows for items to be individualized freely and makes adding items to shop easier. Added triggers to handle displayin/hiding shop dialog - shop requires alive marine not further than 20range from it to show. Added 'regions' to map to achieve range limiting above. Added trigger which auto-hides shop if marine walks too far away from it. It displays information about it happening/reason above marine unit. Copied and simplified triggers responsible for act of buying items, also adding information above marine unit in case of shopping failing to occur. Created custom function to disable new shop at usual times during story-lines and added call for it where applicable. Due to new shop placement modified function responsible for hiding/displaying marine details window, to prevent them displaying same time.While adding items to new usertype changed following: 1.Added 16th color - lightpink. <- changed trigger responsible for changing marine color to accomodate 2.Removed option of buying m5 riffle. 3.Created tooltips for pet skins 4.Copied and simplified tooltips of items. 5.Tooltips of color changes now use exact hex codes correlating to colors you get, most noticeable for 'purple' 'violet' and 'darkgrey' which in old shop are simply different from what you buy. 6.Color changes buttons now visibly show what color they correspond to, using correct hex codes from point 5. - thx to JMM
[Added into 'Assets/Textures' folder of map itself, can't get it to work in 'notd assets.sc2mod' for whatever reason, after 1 hour of trying to directly pasting/importing into mod/importing into map, while closing and opening editor i gave up] - hopefully it's not that much trouble to move them over 16 buttons named 'btn-#color#.dds' referenced by first 16 instances of 'shopitems' usertype.