Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Egmundo Huevoz

#61
Quote from: Crimson Wizard on Mon 18/12/2017 22:53:18
@Egmundo Huevoz, there was a bug in 3.4.0 editor that fails to read game version if there are extra letters in it, you can fix this by changing EditorVersion="3.1.2 SP1" to EditorVersion="3.1.2".

This bug was found as 3.4.1 got to "release candidate" state, so I thought its too late to patch previous version and fixed it in 3.4.1 instead.
3.4.1 RC3 is an "almost out" version, will be released shortly if no more serious problems will be noticed.
Cool, it worked, thank you very much! One more question, though: in "script compatibility level" it says "3.2.1". Does this affect me in anyway? Like when using new commands and such.

Edit: also, I have a game from 2.72. My idea is make a new game in 3.4, and fuse it with the previous 2 games (2.72 and 3.1), to make a single game. You just solved the 3.1 problem for me, but when I port 2.72 to 3.4, it seemingly works, but when I try to run the game from AGS or open the 1st room (the other rooms, chars and everything else seems to work), this shows up:

The first line is Spanish and it means something like "error: attempt to read or write in a protected memory. Often, this means there's another damaged memory."

Code: ags
Error: Intento de leer o escribir en la memoria protegida. A menudo, esto indica que hay otra memoria dañada.
Version: AGS 3.4.0.16

System.AccessViolationException: Intento de leer o escribir en la memoria protegida. A menudo, esto indica que hay otra memoria dañada.
   en load_room_file(SByte* )
   en load_crm_file(UnloadedRoom roomToLoad)
   en AGS.Native.NativeMethods.LoadRoomFile(UnloadedRoom roomToLoad)
   en AGS.Editor.Components.RoomsComponent.LoadNewRoomIntoMemory(UnloadedRoom newRoom, CompileMessages errors)
   en AGS.Editor.Components.RoomsComponent.LoadDifferentRoom(UnloadedRoom newRoom)
   en AGS.Editor.Components.RoomsComponent.LoadRoom(String controlID)
   en AGS.Editor.Components.RoomsComponent.ItemCommandClick(String controlID)
   en AGS.Editor.Components.BaseComponentWithFolders`2.CommandClick(String controlID)
   en AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)
   en AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)
   en System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   en System.Windows.Forms.TreeView.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Then this shows up, apparently it's the same text as before:



#62
Quote from: Crimson Wizard on Mon 18/12/2017 12:53:14
Looks like a bug in AGS, question is whether this is one we already fixed or not. Could you tell which version exactly do you use? Check in Help - About window, there will be string like "AGS Editor .NET (Build 3.4.X.X)".

E: by the way, also, could you open Game.agf with notepad and tell if there are any letters in "EditorVersion" value string in the beginning of the file, something like "SP1" or similar?

This is my version of 3.4:
AGS Editor .NET (Build 3.4.0.16)
v3.4.0, March 2017

This appears in Game.agf:
<AGSEditorDocument Version="3.0.3.2" VersionIndex="4" EditorVersion="3.1.2 SP1">

It appears your suspicions were correct.
Idk if it matters, but I have Windows 7 ultimate.

Quote from: eri0o on Mon 18/12/2017 08:37:59
A long shot, but try the AGS Beta 3.4.1 RC 3 and see if it opens.
Yes, it opens with this version! But I'm scared to use a beta version. I read somewhere on the site that it is not recommended.


#63
Hello! I've made a game a few years back, using AGS 3.2. Now, when I try to open it with 3.4, I get a load of errors, which I don't even know what they mean. I don't know where to start "fixing" the game so I can edit it (and build on top of it) on 3.4.

This is the error screen:


"La cadena de entrada no tiene el formato correcto" is spanish, and it means something like "the entry chain doesn't have the right formatting".
"en" means "in".
#64
I made it! Of course I don't have to explain this to you, but for the noobs who'll see the post in years to come. First I made a new property, "unsellable", and set it to 1 on the inventory "iKey". Then I tried to sell the key, and it worked, it couldn't be sold and it showed me a message saying so. The poster sold like always. I could still buy keys, though. It would be simple to make an item unbuyable, too. With the reverse of this code, or simply by removing the items from the merchant's inventory, like you said (there are not many instances where this would be useful, though. Maybe to unlock some items as the player progresses, idk).

Code: ags
void on_mouse_click(MouseButton button) {
  if (!gShop.Visible) return;
  if (button != eMouseLeftInv) return;
  InventoryItem* ii = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
  GUIControl* gc = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
  if (gc == null) return;
  InvWindow* iw = gc.AsInvWindow;
  if (iw == invShopPlayer && ii != null)
    if (ii.GetProperty("unsellable") != 0)
      Display("I can't possibly buy that!");
    else Sell(ii);
  if (iw == invShopMerchant && ii != null) Buy(ii);
}


I think I don't need anything else, it's a miracle 8-0 Thanks a lot, man! You're mighty helpful for a guy who probably has fantasies of shooting the monitor every now and then (laugh)
#65
Quote from: Khris on Fri 15/12/2017 10:26:56
I updated the files with a solution to show the amount instead.
Link is still the same: https://drive.google.com/open?id=1hy0DMIFftH4R0nEIyKrCq40A_AvULLnV

I did use a button and GUI for this, since it turned out one can't simply change InventoryItem.Graphic, given that player and merchant are usually going to have different amounts of each item.

I also found out that a non-clickable Button covering an InvWindow makes InventoryItem.GetAtScreenXY() return null although other GetAtScreen() methods do work if the thing on top is not clickable, afaik.
This works great, thank you very much again! The only thing left for me to ask to you is if you could explain to me how would I make it so essential items don't show on the shop interface, or show but be unsellable. Maybe it's with that piece of code you pasted at the end of your previous post, boolean something or other, IDK (laugh). If it is, were should I put it? I'm sorry for my extreme noobness. :~(
#66
I've been checking your file since I posted my reply. You seem to have read my mind, because that's one of my questions, among others:

1) Very important: how to make items unsellable? Wouldn't want the player selling a key or something.
2) If I were to change the option to make inventory items stack, how would I display the number of such items I have left? Again with the example of 200 potions, you can imagine it would clutter the inventories.
3) Can I add other tags to the items, other than name and value? For instance if I wanted to have tags with the item's type, such as "weapon", "consumable", and so on...
It would read: Large sword - Weapon - $10.
4) Not a question about your shop, but how can I add multiple inventory items with just one line? For instance if I want a merchant to have 200 potions, I wouldn't want to clutter the script with 200 lines. Surely there's a better way. I know it's with "inventoryquantity", but I can't get it to work and the manual's example show's a different thing.

Thanks again, in advance, for all your valuable help.

P.s: I added that line you said :)
#67
Quote from: Khris on Mon 11/12/2017 15:56:39
Quote from: Egmundo Huevoz on Mon 11/12/2017 12:39:30But I was hoping somebody already made something like this in one of the numerous AGS games, and could give me the script.

I actually might whip up a basic demo game, but I'd have to know how you want this to work regarding money. Are the items going to have a fixed price?

Edit: here you go: https://drive.google.com/open?id=1hy0DMIFftH4R0nEIyKrCq40A_AvULLnV

For the love of god, this is EXACTLY what I wanted. Hell, it's even better, I didn't even expect to see the items graphics, nor a description... Really, this is great. Maybe for someone as knowledgeable as you, it's not a big deal, but for me, this is gold. I can't thank you enough. Thanks for taking the time to help me.
#68
Quote from: Khris on Mon 11/12/2017 02:23:06
Does it have to be a listbox? You could use a GUI with two inventory windows instead, and assign the first one to the player character, the second to the actual merchant character or a dummy character.
If you do that, you can move the items back and forth simply by using Character.Add/LoseInventory().

All you have to do is figure out which item was clicked; for the player you can use custom inv click handling (enable it in General Settings and use on_mouse_click + eMouseLeftInv), for the merchant you'll probably have to use some basic math involving GUI / inv window coordinates and its ItemWidth / ItemHeight.
You're right, it doesn't necessarily have to be a list box, I'm gonna modify the post's title. The thing with your solution is that I wouldn't know where to start. I know, probably being such a noob, it isn't recommended for me to try and do something so complex. But I was hoping somebody already made something like this in one of the numerous AGS games, and could give me the script.
#69
Hello! As my title says, I'm trying to make a shop for my game. I've been trying by using a list box inside a GUI. My problem is that when I use the "removeitem" function, the numbers of the rest of the items change, rendering the rest of my code, useless. Also, I'm trying to figure out how to be able to sell and item. I.e. have the desired item disappear from my inventory and show up on the merchant's list box. Is there any module for this already done, or can somebody help me? Thanks in advance...
SMF spam blocked by CleanTalk