UnReal World forums

UnReal World => Modding => Mod Releases => Topic started by: Night on December 05, 2020, 10:20:50 AM

Title: [3.71] [3.63] URWSSSelector v1.0.3
Post by: Night on December 05, 2020, 10:20:50 AM
[3.71][3.63] URWSSSelector v1.0.3
(Start Spot Selector)

Simple mod that allows you to select your starting location with ease during character generation, simply start the program while unreal world is running and the starting location will follow your cursor. Map must not be zoomed in in order for co-ordinates to work properly. Right click to stop moving starting location and exit program.

Also make sure the game is in windowed mode while using this, fullscreen will cause issues when overlaying over URW. You can change it back to fullscreen afterwards of course.

Source included at bottom of thread if anyone is interested

Usage:
(https://i.gyazo.com/8f9e0a0921d8d11f9a663a92886df634.gif)

Instructions:

Modes: (Mouse-Scroll)

Version History:

Please report any bugs to me via this thread, my PMs, or contact me directly on steam:
https://steamcommunity.com/id/Nightipoo/

Download attached to thread.

Credits:
   Night - Creator/Programming.
   Enormous Elk - Unreal world.

Requires Microsoft .NET Version 4.6 or later. (Usually already installed)

Source for study: [v1.0.0] (https://pastebin.com/4rNEa9u2), [v1.0.1] (https://pastebin.com/ECnLTRhT), [v1.0.2] (https://pastebin.com/sBbBcubK)
Title: Re: [3.63] URWSSSelector v1.0.0
Post by: Buoidda on December 05, 2020, 11:36:22 AM
Wonderful!

But I have technical problems making the drag. The moment I left click, Urw window minimizes and focus changes to URWSSSelector.exe on taskbar.

EDIT: Not using fullscreen mode solved that.

This is great!!!! Thank you so much @Night!!!! You have made a huge contribution to the community.  ;D
Title: Re: [3.63] URWSSSelector v1.0.0
Post by: Night on December 05, 2020, 11:51:59 AM
Wonderful!

But I have technical problems making the drag. The moment I left click, Urw window minimizes and focus changes to URWSSSelector.exe on taskbar.

(http://)

The focus should change, as you're actually clicking an overlayed window ontop of the game. I'm not sure why your game is minimizing though, if you're unable to find a solution I'll make a work around for it. I'll do some testing as well and see if I can reproduce it, I run the game in windowed mode if that helps.

If you do manage to get it working, once you've drawn the box and got the location where you want it you can just right click and it'll exit the program and leave the location where your cursor is.

EDIT: Not using fullscreen mode solved that.

This is great!!!! Thank you so much @Night!!!! You have made a huge contribution to the community.  ;D
edit:
Ah yes, as I suspected a window orientation problem :P I'll leave you to it and make a note in the OP ^^
Title: Re: [3.63] URWSSSelector v1.0.0
Post by: Brygun on December 05, 2020, 03:56:31 PM
My efforts to die survive in the island challenge are greatly enhanced!

Title: Re: [3.63] URWSSSelector v1.0.0
Post by: Frostbit on December 05, 2020, 05:45:14 PM
Looks great! I'll try it out next time I boot into Windows.

Sure will beat the hack around way I've been having to use.
Title: Re: [3.63] URWSSSelector v1.0.0
Post by: Tinker on December 06, 2020, 10:03:52 AM
I will ask my usual question, what about Linux users?
Title: Re: [3.63] URWSSSelector v1.0.0
Post by: Night on December 06, 2020, 11:30:10 AM
I will ask my usual question, what about Linux users?

@Tinker

Python seems to be the best way to implement these sorts of things for URW on Linux systems.

I have no idea what you have to work with on Linux so I can't give you a clean answer, but the requirements for this are fairly straight forward:

Requirements:

Memory addresses:
URW.exe = Process.MainModule.BaseAddress (whatever the python/Linux equivalent of this is)
XStart = (urw.exe)+0x1B4BA0
YStart = (urw.exe)+0x1B4BA4

Data:
X, Y, Width, Height, of the unrealworld map in map generation. I've used user input as an initial method for getting this via dragging the box over the map, an easier way I've just implemented is calculating the first and last blue pixel co-ordinates from a screenshot of the game (IE top left edge of the map, and bottom right edge of the map).

Mouse cursor X/Y, relative to game window.

after you have the required data you can WriteProcessMemory (Windows version of memory writing) to XStart and YStart after calculating the cursors position relative to the maps x, y, width, and height

Code: [Select]
                X = (int)((Cursor.X - URWMap.X) * (3072m / URWMap.Width));
                Y = (int)((Cursor.Y - URWMap.Y) * (2048m / URWMap.Height));

This gives you the co-ordinates of the cursor within the map, 0,0 being the top left most map tile. Once this is implemented you should be able to implement it w/ mouse inputs, I detected movement and constantly changed the XStart and YStart values to the calculated co-ordinates, another way would be to just detect when the mouse clicks and set the XStart and YStart to the click/cursor location.

There are also, probably, additional ways to change your location on the map through save files after you've gone through character creation, if memory read/write isn't an option.
Title: Re: [3.63] URWSSSelector v1.0.1
Post by: Night on December 07, 2020, 10:56:24 AM
~Update @Brygun @Frostbit @Buoidda

v1.0.1 -
Title: Re: [3.63] URWSSSelector v1.0.1
Post by: trowftd on December 07, 2020, 12:02:03 PM
Wow v1.0.1 features are awesome. I have to add this program too in my playthroughs. Thank you for making these amazing programs you rock! :D
Title: Re: [3.63] URWSSSelector v1.0.1
Post by: Buoidda on December 07, 2020, 03:15:07 PM
Wow it gets even better! Tiny specks await 8)
Title: Re: [3.63] URWSSSelector v1.0.1
Post by: Frostbit on December 07, 2020, 05:31:38 PM
Fantastic! I think I'll go ahead and boot into Windows today and create a few dozen starts. Great work!

Update: Made more than a dozen starts. Worked like a charm!
I especially love being able to start in the heart of Njerpez territory. They won't know what hit 'em! ...I hope.
Title: Re: [3.63] URWSSSelector v1.0.1
Post by: ineedcords on December 09, 2020, 09:46:01 PM
[3.63] URWSSSelector v1.0.1
(Start Spot Selector)
<snip>
Just a quick one to say thanks for the tool and the source code & freely sharing your knowledge.

Did you consider using Lazarus/FreePascal for your utilities? That would be write-once, compile & use everywhere (win+lin+mac).
Title: Re: [3.63] URWSSSelector v1.0.1
Post by: Night on December 14, 2020, 02:35:43 PM
~Update

v1.0.2 -

Left v1.0.1 attached just incase people prefer the minimal version.

Just a quick one to say thanks for the tool and the source code & freely sharing your knowledge.

Did you consider using Lazarus/FreePascal for your utilities? That would be write-once, compile & use everywhere (win+lin+mac).

I took a look at it briefly after reading your post. Seems like it would work, but not something I want to invest a serious amount of time in currently, as I'd have to translate a lot of my work/learn the language before getting a decent foundation built. It's a good idea though for compatibility sake.
Title: Re: [3.63] URWSSSelector v1.0.2
Post by: TheyCallMeSibs on December 21, 2020, 02:46:31 PM
Note to guests searching for the mod here, you need to be logged in to see the download.
Title: Re: [3.63] URWSSSelector v1.0.1
Post by: paulkorotoon on February 04, 2021, 11:53:25 PM
I took a look at it briefly after reading your post. Seems like it would work, but not something I want to invest a serious amount of time in currently, as I'd have to translate a lot of my work/learn the language before getting a decent foundation built. It's a good idea though for compatibility sake.

Is the mod written in C#? As far as I recall, there's MonoDevelop (https://www.monodevelop.com/) that is cross-platform, just like Lazarus, but is exactly for C#. Never used it myself, though, (got zero knowledge of C*, hehe), so can't say for sure is it good IDE or not.
Title: Re: [3.63] URWSSSelector v1.0.1
Post by: Night on February 05, 2021, 02:42:55 AM
I took a look at it briefly after reading your post. Seems like it would work, but not something I want to invest a serious amount of time in currently, as I'd have to translate a lot of my work/learn the language before getting a decent foundation built. It's a good idea though for compatibility sake.

Is the mod written in C#? As far as I recall, there's MonoDevelop (https://www.monodevelop.com/) that is cross-platform, just like Lazarus, but is exactly for C#. Never used it myself, though, (got zero knowledge of C*, hehe), so can't say for sure is it good IDE or not.

Yes its written in C#, I'll look into the link you posted.
Title: Re: [3.70 Beta] [3.63] URWSSSelector v1.0.3
Post by: Night on July 03, 2021, 02:08:43 AM
~Updated for 3.70b beta, minor bug fixes, middle mouse click instructions added to OP
Title: Re: [3.70b Beta] [3.63] URWSSSelector v1.0.3
Post by: MilitanttiTalitintti on July 22, 2021, 07:26:42 PM
Why isn't this an integral part of the game in the first place?  :D
Title: Re: [3.70b Beta] [3.63] URWSSSelector v1.0.3
Post by: ineedcords on July 23, 2021, 01:35:45 AM
Why isn't this an integral part of the game in the first place?  :D
If click-n-pick spawn position feature was added to the vanilla game, I would use it. I don't think it is cheating as it is not much different than changing random spawn position several times until you get one you like (similar to character creation time dice re-rolling).

Probably not added because nobody suggested it in the suggestions thread. Feel free to do so :) https://www.unrealworld.fi/forums/index.php?board=5.0
Title: Re: [3.70b Beta] [3.63] URWSSSelector v1.0.3
Post by: Tinker on July 23, 2021, 09:56:16 AM
Because this script does not work with linux I would like to see it added to the vanilla game in some form.

After trying to start an island challenge game, actually on any island, I gave up after 426 rerolls and started a normal game, everything random as usual and I course I was dumped on an island - typical of my luck.

Added to sugestion thread https://www.unrealworld.fi/forums/index.php?topic=6515.0
Title: Re: [3.70b Beta] [3.63] URWSSSelector v1.0.3
Post by: Night on October 21, 2021, 11:17:43 PM
~ Updated to 3.70 stable
Title: Re: [3.70] [3.63] URWSSSelector v1.0.3
Post by: Bert Preast on October 23, 2021, 12:48:42 PM
He's back!  Our night in shining armour  :)
Title: Re: [3.71] [3.63] URWSSSelector v1.0.3
Post by: Night on November 25, 2021, 12:44:37 PM
~Updated, same version checking issue.
Title: Re: [3.71] [3.63] URWSSSelector v1.0.3
Post by: MilitanttiTalitintti on December 16, 2021, 08:50:19 PM
When I try to use it in the world location menu it just tells me "Unreal world not found running. Closing URWSSSelector."
Title: Re: [3.71] [3.63] URWSSSelector v1.0.3
Post by: Night on December 17, 2021, 04:06:13 AM
When I try to use it in the world location menu it just tells me "Unreal world not found running. Closing URWSSSelector."

Just tested and it works fine on my end, If you'd be up for more extensive testing, we can try to pin point the problem over discord:

Night#9736

The try catch statement where you're getting that message from has a couple of different spots that can cause it to throw an error, two things you can check for right now are:

• Running as administrator
• in task manager, under details, confirm that unreal world is running as 'urw.exe'
Title: Re: [3.71] [3.63] URWSSSelector v1.0.3
Post by: MilitanttiTalitintti on December 19, 2021, 11:41:24 AM
It might've been because I didn't run it as administrator. I rolled for my start the traditional way. I'll give it another try later.