|
Post by Tânia on Jan 17, 2021 8:18:32 GMT -5
I can't download the files from : simfileshare.net/folder/126804/ If the files clicked, it just took me to a page with a bunch of XML syntax. Hello ! the link is good. Try Again click on the link simfiles..... and then click on o19_http_server.zip and download.
|
|
|
Post by pandamontok on Jan 17, 2021 10:54:50 GMT -5
I replaced the console with an HTTP server. Delete the o19_socket.py file. The old download is available for reference in simfileshare.net/folder/126804/ but only o19_http_server.zip with 2 files is needed! Extract both files into the Mods\o19-Debug\Scripts\ directory. Then start TS4 and enter in the cheat console (Ctrl+Shift+C) 'o19.http.open'. The socket should close after 30 minutes / timeout errors. Press Alt+Enter to switch to windowed mode and open 'http :// 127.0.0.1 : 10000 /' (without quotes and spaces) in browser (so far only tested with Firefox and Edge). It will load the o19.html file (you may edit the local file to tweak settings) and display it in the browser. Now also with mouse support. 1. Ok, I've downloaded the o19_http_server.zip file. 2. Extracted it. 3. Delete the o19_socket.py file.
4. Put it on Mods\o19-Debug\Scripts\ directory 5. Start TS4. 6. Open cheat console. 7. Type (copy paste) o19.http.open (But nothing seems happening, no message, no nothin) 8. Press Alt+Enter 9. Open a FF browser, enter 'http :// 127.0.0.1 : 10000 /' (without quotes and spaces) 10. I got an error message : Unable to connect
So... where did I go wrong? And what should actually happen?
|
|
|
Post by o19 on Jan 18, 2021 16:56:58 GMT -5
It seems that you don't have script mods enabled. Or you have such a directory structure "...\The Sims 4\Mods\Mods\o19-Debug\Scripts\" which will not work. Otherwise entering "o19.http.open" should write to the console that the server is now listening or at least an error message. I updated it to v3 with a short README.txt (may still be improved), better logging and an external configuration file. If script mods are enabled it should at least create a log file "...\The Sims 4\mod_logs\o19_http_server.log" and log there 'Starting mod o19_http_server' Even if things went terribly wrong this code would have logged an error: sims4.commands.Command('o19.http.open', command_type=sims4.commands.CommandType.Live) def cmd_o19_http_open(_connection=None): out = sims4.commands.CheatOutput(_connection) try: ... out(f"Started socket thread.") except Exception as e: out(f"Oops! {e}")
|
|
|
Post by pandamontok on Jan 18, 2021 22:51:05 GMT -5
Now I'm able to get the message on the cheat console and connected on the browser.
But, then I choose a sims, tried to hit the buttons, nothing is rotating or moving.
Sim rotation: a s d f g ... Rotate the Sim 90°, 45°, 25°, 5°, 1° to the left. h j k l ... Rotate the Sim 1°, 5°, 25°, 45° to the right.
The Rotation matrix allows to adjust how the cursor and numpad move the Sim. If 'up' moves the sim to the left instead to the back use the rotation matrix to fix this. Or rotate your scene within TS4. q w e r t ... Rotation matrix -90°, -45°, -25°, -5° or -1° u i o p ... Rotation matrix 1°, 5°, 25° or 45°
Cursor Keys ... Move the Sim 0.5 in x/y direction. Cursor Keys + Alt ... Move the Sim 1.0 in x/y direction.
Numpad-0 ... Set the move delta to 0.01 Numpad-. ... Set the move delta to 0.1 Numpad-* ... Double the move delta. Numpad-/ ... Half the move delta. Numpad-+ ... Move the Sim 'move delta' up. Numpad-- ... Move the Sim 'move delta' down. Numpad-1..4, 6..9 ... Move the Sim 'move delta' up/down/left/right. Num-Lock must be active. Entering numbers 1-9 does not work.
Am I missing something?
|
|
|
Post by o19 on Jan 19, 2021 0:55:03 GMT -5
It works fine if the sim is in pose mode or idle. It may do nothing during animations at the moment. This may be fixed by using other positioning functions.
|
|
|
Post by pandamontok on Jan 19, 2021 3:30:30 GMT -5
Well, I tried, but not working on my side. The sims is on idle. All the buttons only trigger the default hot keys of sims4.
|
|
|
Post by o19 on Jan 19, 2021 11:25:54 GMT -5
You should keep a small browser window (~200x200px) in foreground as it will capture your input and send it to TS4. Or if you have two screens put the browser with 127.0.0.1 : 10000 open on the other one, activate it (click into it) and enter there 'aaaa' (on the web page, even though there is no input field).
|
|
|
Post by pandamontok on Jan 20, 2021 1:16:14 GMT -5
I see. Yea the browser window need to be on top for the script to function.
Here's my opinion about this script: To me the rotation is very helpful. Because now I don't have to go through the menu and guessing how many degree I have to input everytime.
Moving the sims by using arrow pad is nice and helpful, but sometimes not too intuitive, since the direction of movement isn't relative to where my current view is. Thus, Sometimes I press right, the sims move to the left, etc. And I have to adjust it with q w e r t ... u i o p. Although I understand, this probably the simplest method to code.
Moving the sims by using the mouse, is tricky. Because it's lagging between the movement of my mouse and the movement of the sims. Need to move carefully. Currently for precision, moving the sims using the keypad is better.
The browser need to use extra extension to keep it always on top. If not, I have to switch over and over again to the browser.
For me machinima maker, your script mod will help the process of machinima making more efficient. I can cut the menu steps. You can imagine, like in the youtube project I'm currently on, I work often with 20+ sims.
This is my opinion after playing with it a little while.
So.. thank you for this mod. Are you going to improve it. Or this will be the final?
Sometimes I imagine, that there's a sims4 version created specifically for machinima maker. For people who want to make movies.
|
|
|
Post by o19 on Jan 20, 2021 7:08:36 GMT -5
Id there are things to improve which I can do I'll likely do. Otherwise everyone else may also develop it further.
The movement is delayed a little bit, and with the mouse too much events are triggered. While it works it's not useful. One would need to experiment whether dropping instead of sending events would help.
sim.get_camera_position() could be the function to get rid of the transformation matrix. While I thought that you'd store one camera position and use it for all positioning actions. But if you rotate it a lot then I hope that I find some time to look into this.
One thing which will be added for sure is a small browser popup window. So one cat at least minimize the browser.
|
|
|
Post by pandamontok on Jan 20, 2021 7:31:42 GMT -5
Regarding the camera. Well, I could stay in one angle when placing the sims in place. But, sometimes I have to move to find a nice angle for a frame shot.
Instead of a browser, Is it possible for you to make a pop up interface inside the sims. I think that would be better than a browser. But... which one is easier for you to make.
I have other suggestion. When I rotate with 'A' my finger automatically hit 'S' to turn for the other direction. I think it would be better if you make the rotation button side to side, instead of across the field, like 'A' and 'L' So people can work with one hand instead of two hands.
|
|
|
Post by o19 on Jan 26, 2021 16:50:48 GMT -5
It took me a little bit longer to build v4 and make it available at simfileshare.net/folder/126804/Now left/right moves the sim to the left/right on an elliptical path, always 90° to the sim-camera axis. Cursor up/down moves along the sim-camera axis. '+-' up/down (floating) works as before. The popup shrinks when it's not in use and expands when it's active. With an Always-On-Top application one can keep it always visible so switching between TS4 and the popup is easy. Python code to do this is included which requires a full Python installation as the game does not support it - This code could be added to the mod but it wouldn't work. The mouse works much better, I reduced the send queue to 3 requests. Maybe 2 or 1 is even better - I didn't test it so far. This version opens the socket and the browser during startup so the console is no longer needed. I'll stay with the external browser, with this TCP connection on could also send cheat commands, select sims etc. without opening the console window. Could be great for recordings, teleporting a sim without a teleporter statue or spawning one without going to CAS. If you don't like the key mappings please edit html/o19.html on your own and re-define them as you like. From my perspective F and J are easy to locate on every keyboard and with +-5° the rotation seems to fine. Not sure how to map all the various angles to a-g to be able to use the left hand exclusively. Now that the rotation matrix is no longer needed one may use q-t for the other direction, any input is welcome.
|
|
|
Post by pandamontok on Jan 28, 2021 15:51:18 GMT -5
Hi, thank you for this update. So I've tested this V4. First, it's much better than the previous one. I like that I can use shift and CTRL to make smaller movement. I like that I don't have to use cheat console anymore to activate this. With the current mouse movement, it's useful for adjusting minor/detail positioning. But I still don't know how to use the always on top. I click the file 'always-on-top', but the FF browser still isn't always on top. How to use this? Next, to always move 90 degree relative to the camera angle, seems not always be the best. For example like when I want to move the sims to the left/right in straight line on a straight floor of a room. I can't really do that, since the camera angle isn't perpendicular to the floor (I have to make it perpendicular, if I want to do so). even though I think this method still useful. Is it possible to add another way of movement? Still relative to the camera angle, but not 90 degrees. Like in the previous version, but with x y relative to the camera, and in accordance to the ground grid. (Well, I'm not sure if the game have invisible grid on the ground) And make this the default movement method, And the 90 degrees perpendicular to the camera as second method of movement by pressing ALT + keypad?
Of course that's if you still want to work on this mod. For me, it's still very useful the way it is.
|
|
|
Post by o19 on Jan 29, 2021 2:30:08 GMT -5
It's possible to enable also the old rotation matrix option. I left all the code in the HTML page but one will need a switch to use either one or the other method.
A rug or cross to show the real x/z coordinates like TOOL does could help, this would require some more code to spawn and destroy objects remotely.
Regarding 'always-on-top': The default configuration does not launch any application. If you have Python installed you may double-click the 'always-on-top.py' file to check whether it works for you. If it does create a o19_http_server.ini file with the command based on the -default.ini file which only includes the command as a comment. If you have any other AOT application which you want to use you can add it there. 'The Sims 4' will start this application in the same user context its running if you click on AOT in the browser. There should also be a log file which tells you that AOT is not defined. If you have Python installed
|
|
|
Post by pandamontok on Jan 29, 2021 6:02:32 GMT -5
"It's possible to enable also the old rotation matrix option. I left all the code in the HTML page but one will need a switch to use either one or the other method." Well, mmm... that's not what I meant. I mean without have to use the old rotation matrix option, I wish taht the program can determine by itself the position left and right, up and down relative to the camera. Sooo....instead of moving 90 degrees relative the camera, it moves base on the grid direction relative to the camera. I think the previous version already move based on the grid, but it wasn't relative to the camera. So left and right can get mixed up. Showing the grid isn't necessary/. I just wanted to explain how the movement should behaves by using the grid. | "A rug or cross to show the real x/z coordinates like TOOL does could help, this would require some more code to spawn and destroy objects remotely" Mmm... A rug or cross to show the real x/z coordinates isn't needed. That's not what I was trying to suggest. Regarding AOT: Please forgive me. Your words are too developy for me. :D I'm someone who don't understand anything about how phyton should work.
OK, let me get this straight to reduce missunderstanding. In this V4 version, you made the browser to be able to be always on top, yes or no? If yes, how to use it, because currently that little box browser isn't always on top on my side.
|
|
|
Post by o19 on Jan 31, 2021 15:35:40 GMT -5
If you want the popup to be always-on-top you need either an external application (like AutoHotKey) or Python installed (https://www.python.org/downloads/ - the installation is straight-forward) if you want to use the supplied 'always-on-top.py' file. Double-clicking it will bring the popup into the foreground until it's closed.
If you want the 'AOT' button within the popup window to work you also need to create a file 'o19_http_server.ini' with this content:
{ 'always_on_top': '%USERPROFILE%\\Documents\\Electronic Arts\\The Sims 4\\mod_documentation\\o19-http-server\\always-on-top.py' } Double-clicking on 'AOT' will then launch 'always-on-top.py'. Otherwise 'AOT' does nothing.
'v5' comes with three options to move the active Sim. 1) 'rot' from v3 which allows to change the rotation with [qwert uiop]. The 'Get Rotation' button will get the cam-sim angle and modify it locally - replacing the current value. The value may be fine-tuned with [rt ui] and will be independent of the camera angle. 2) 'xz' moving the sim along the in-game xz axis without any rotation. 3) 'cam' as seen in v4. [default] The buttons and options are all double-click to avoid unintended actions.
If you want 1) as default modify in o19.html at the end: 'mode_rotation(2);' to 'mode_rotation(0);'
|
|