Yo guys! I haven’t been around since Thomas was running shop, which was a few years ago, but I’ve definitely been around for 10+ years and I miss contributing so here’s a short tutorial for something weird missing in the engine!
Edit: From @or3o’s suggestion I added a min/max amount so the reward is a random number between the two.
[Client] (I think)
Simply, when you get resources there was no slider to increase the reward amount… I use the old Prospekt Engine source which has an editor suite… But in Eclipse, most likely you gotta open the client and your map editor, find the frame that contains the slider that chooses what number your resource has, and add these four babies:
Make sure to set the min amount to 1 on the scroll and max amount to whatever you feel like, but something Base10:y in my opinion (not 32767, looks ugly af!)
I named them “lblAmountMin/Max” and “scrlResourceMin/Max” and then added this sub for actually using then:
Private Sub scrlResourceMin_Scroll() lblAmountMin.Caption = "Min. reward: " & scrlResourceMin.Value End Sub Private Sub scrlResourceMax_Scroll() lblAmountMax.Caption = "Max. reward: " & scrlResourceMax.Value End Sub
Now all you need to do is find the part that places a resource tile in EditorMouseDown or whatever your sub is called, should look like this:
' resource If frmMain.optResource.Value Then .Type = TILE_TYPE_RESOURCE .Data1 = ResourceEditorNum .Data2 = 0 .Data3 = 0 .Data4 = 0 End If ```and just replace ".Data2 = 0" and ".Data3 = 0" with ".Data2 = scrlResourceMin.value" and ".Data3 = scrlResourceMax.value" or if your sub is outside the form of the object, "FORMNAME.scrlResourceAmount.value". **[Server]** This one is sooo simple, I love the way tiles can store more data than they need, so you can add shiz to existing tile types. All we need to do is find the sub that rewards the player for exhausting a resource **(CheckResource)** I believe, so open that sub, find the place where the player is given an item, the amount will be a static "1", so just change that to:
RAND(Map(GetPlayerMap(index)).Tile(X, Y).Data2, Map(GetPlayerMap(index)).Tile(X, Y).Data3)
And you're done! That felt good.