Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Smallio_Pro last won the day on March 8

Smallio_Pro had the most liked content!

Recent Profile Visitors

580 profile views

Smallio_Pro's Achievements

  1. Takes me back to my sys admin days. Nice tutorial
  2. Pull the code from Github: https://docs.freemmorpgmaker.com/en-US/developer/start/prerequisites/ The icon is in the "assets" folder so just change that and then compile the code
  3. Back working on my Intersect project. Now working on 3 projects so working on an MMO for any sane person would be out of the question. Luckily "Sane" with out "In" is not part of my vocabulary. Looking forward to getting more invested in the community/ writing more tutorials. Also looking forward to the time I can start showcasing my mmo project, android project and single player project. 

  4. You are going to have to hard code it in. I can explain how but It will be easier to know why you will need to do this first. Obviously having 2 weapon slots is going to cause huge conflicts. If you have 2 weapons attach your client is going to crash because it won't know which data to use. Like if you have 2 animations set for two different weapons and you got them both equipped, the client is going to get confused. If you want to pull one property from the weapon slot then it will work. For example. I wanted to have the shield slot determine the projectile and not the weapon slot so I took that property away from the weapon slot and placed it on the shield slot so there wouldn't be any conflicts. Now I have an archer class which the bow(weapon slot) determines the attack animation and the arrows(shield slot) determines the projectile.
  5. It's the idea I said but instead of making a tone of instances that take 1 of a certain item. I made a label and made it loop instead. tested and working edit: feel free to send a dm if you I am not clear
  6. It's not very neat but could you make an integer variable that stores item count. Then make an absolute sh*t tone of instances that take away 1 of a certain item. at the top of the common event set the integer to equal 0. In the "take item succeeded part" add 1 to the variable. In the "Failed part" tell it to add the item back to the inventory with the quantity equal to the variable then exit the event. You would have to copy and paste that code 100 - 1000 times but it's the only way I can think about how getting around this limitation. Edit: Wait I think I know how to do this in a neater way. lemme make a screenshot
  7. As Panda said the inventory window is already draggable. The hotbar (which you highlighted in the screenshot) I believe has to be hardcoded to be draggable. I can experiment in the code to find out an easy fix if you like but you may have to wait a bit since im currently on vacation. Unless anyone else is down to beat me to it
  8. I coded in an easy collapsible chatbox if anyone wants a tutorial at some point?
  9. It's one of those small easy features that when put in creative hands go a long way
  10. Version: 0.7.10 Originaly Written: 07/03/23 Last updated: (Warning!! Always backup any files when working on the source code!) Index 1. Introduction 2. Show Case 3. Declaring And Calling "GroundIcon" 4. Redesigning The Item Editor 5. The Final Stretch 6. Extra Notes 7. Ending Ramblings Introduction Since I am no longer using this engine anymore for my current project I thought I would help a few people out with show casing some of the features I finished before moving over. One feature being the ability to set what the items looks like when on the floor. Essentially you can select what your items look like when they are dropped and what they look like when they are in your inventory. Before reading further, this tutorial is for people who have a small knowledge of coding. Not a tone of knowledge, as long as you know what an if statement is and how to use Ctrl + F you shouldn't get lost but I recommend starting with this guide here: https://docs.freemmorpgmaker.com/en-US/developer/ Show Case I had an issue where my items were bigger than my player sprites which made my game ugly. The Items looked good in the inventory so I didn't want to make them smaller in the UI. So I coded in a fix. Before the fix: After the fix: And in the editor you can see I can customize both icons individually: Declaring And Calling "GroundIcon" Now onto the fun part, coding. First you are going to want to make the variable your new database of icons will be stored in Then you want to change the code to draw that icon instead of the standard one. We will be calling this variable "GroundIcon" Go to: Intersect.core > GameObjects >ItemBase.cs Find: And add under that line: That's the "GroundIcon" declared. now head over to Intersect.Client > Maps > Mapinstances.cs Under "public void DrawItemsAndLights()" Find: And replace it with: Redesigning The Item Editor We have created our variable and also made it so any icons stored in that variable will show up on the map. Only issue is, "GroundIcon" is empty. We of course are going to assign it some values through the Item Editor. But first we need to redesign the form and code in the components. Head over to Intersect.Editor > Forms > Editors > fmrItem.cs Now you are going to want to rearrange some of the components in that form to make room for the ones you are going to create. Once you have created some room. Copy and paste the existing ComboBox and PictureBox: Now you are going to want to name your new components the following ComboBox = cmbGround PictureBox = picGround For the last step of this section, double click on the new cmbGround and enter the following code: The Final Stretch Our ComboBox has been set up to return a value when saving the editor. And we have called upon a function that will draw our icons in the PictureBox. Yet that function hasn't been written yet, our ComboBox is empty and your copy of Visual Studios is probably throwing out scary errors. Looks like it's time for the final stretch. Lets write out that DrawGroundIcon() first. find DrawIcon: Underneath that enter: That will update the PicGround whenever cmbGround is updated. Now lets add some values to the ComboBox Under "frmItem_Load", find: Add Underneath that: Now our ComboBox has values and our PictureBox show our icons. But when editing multiple items, neither of them our going to update when a new item is selected. Lets sort that at. Under UpdateEditor(), find: Underneath that make room and add: Now finally find: And add underneath: Congratulations! If everything was coded in correctly then you now can edit how items look when dropped! Extra Notes Right now the Ground Icon uses the same RGB shaders as the original icon. Changing this is really easy and only involves coping and pasting the original sliders and editing the DrawGroundIcon() function Ending Ramblings This tutorial was made for those who are just wetting their feet in the source coding half of the engine. I appreciate the fact that I didn't go into the nitty gritty details but I feel that this is more than enough information to understand what's going on here. That said I am always more than welcome to answer any questions. Being a reply or a dm. As for our seasoned programmers, I would love to hear any improvements I can do upon this code so I can edit this post with the best information I can provide. Rather than create a patch everyone could download I thought it would be more helpful to explain the process instead. The documentation is few to zero on the coding end so if this helps 1 person out with understanding how this engines code is structured, even a little, then I would consider that a win. I would also like to show case more features I have worked into the engine in the future that are more and less advanced. All considering how this tutorial goes.
  11. Changing the projectile to be based off of the shield slot instead of the weapon slot can be accomplished by, as of v0.7.2-beta.7 changing the AttackPacket handler public void HandlePacket(Client client, AttackPacket packet) { ... (L1186) if (player.TryGetEquippedItem(Options.WeaponIndex, out var equippedWeapon)) ... to reference the shield slot index public void HandlePacket(Client client, AttackPacket packet) { ... (L1186) if (player.TryGetEquippedItem(Options.ShieldIndex, out var equippedWeapon)) ...
  12. 3 Days working on this, still can't find where in the code it decides the weapon slot determines the projectile The amount of times I have read these cs files line by line has driven me insane. There has to be 1 person on this website that can point me to the if statement I have to change surely...
  13. Right looks like I've been looking at the wrong parts of the code all this time. I still need some help. It looks like the Combo Box I made is actually assigning the projectile. I thought it wasn't storing it at all but it may be a "OnCombat" sort of code stopping it Honestly if someone can help me then please do. I have spent a silly amount of hours on this small feature that is crucial for my game to work
  14. I have added my own working combo box to the Shield properties that changes "mEditorItem.Projectile" so pressing save should send a value but nothing happens ingame. public FrmItem() { ApplyHooks(); InitializeComponent(); Icon = System.Drawing.Icon.ExtractAssociatedIcon(System.Reflection.Assembly.GetExecutingAssembly().Location); cmbEquipmentSlot.Items.Clear(); cmbEquipmentSlot.Items.AddRange(Options.EquipmentSlots.ToArray()); cmbToolType.Items.Clear(); cmbToolType.Items.Add(Strings.General.None); cmbToolType.Items.AddRange(Options.ToolTypes.ToArray()); cmbProjectile.Items.Clear(); cmbProjectile.Items.Add(Strings.General.None); cmbProjectile.Items.AddRange(ProjectileBase.Names); cmbProjectileShield.Items.Clear(); cmbProjectileShield.Items.Add(Strings.General.None); cmbProjectileShield.Items.AddRange(ProjectileBase.Names); lstGameObjects.Init(UpdateToolStripItems, AssignEditorItem, toolStripItemNew_Click, toolStripItemCopy_Click, toolStripItemUndo_Click, toolStripItemPaste_Click, toolStripItemDelete_Click); } cmbProjectileShield.SelectedIndex = ProjectileBase.ListIndex(mEditorItem.ProjectileId) + 1; private void cmbProjectileShield_SelectedIndexChanged(object sender, EventArgs e) { mEditorItem.Projectile = ProjectileBase.Get(ProjectileBase.IdFromList(cmbProjectile.SelectedIndex - 1)); } I'm hoping it's just the case of changing the Shield slot properties now (maybe in ItemBase). If anyone could point me in the right direction you don't know how happy I will be
  15. Hey there, first post and I hate it being a question. I've been doing pretty well with figuring out everything by my self so far. I was wondering how I can take the projectile property off the weapon slot and move it to the shield slot? And then I would obviously need to re-create the projectile drop box in the item editor and move it in the shield properties. I have been working on this for hours and have been so lost in the code I am not sure where to start.
  • Create New...