Log in

View Full Version : How do i script?


ERPP8
05-28-10, 05:32 PM
I keep telling people that say "that's impossible to mod", "you could script it"

But:

HOW DO I SCRIPT???



PLEASE HELP!:wah::wah::wah:

SteelViking
05-28-10, 05:45 PM
Heck yeah, I could use a lot more information on how to script.

Is there a good thread on it, or a video, etc. anywhere we should look into?

kylania
05-28-10, 05:45 PM
http://diveintopython.org/toc/index.html

http://wiki.python.org/moin/BeginnersGuide/NonProgrammers

reaper7
05-28-10, 05:47 PM
I keep asking myself that everyday. Best advice I can give is to look at the stock scripts and other peoples scripts. Pick a feature out of them you'ld like to replicate and trace that function through the script - copying the relevant parts into say notepad.
Then change all the item valuse to match your items you want to control.
Its difficult but possible - you can expect a lot of hair pulling due to countless script errors.
But stick with it and sonner or later you'll get it to work.

Have a look at my scripts in my UI - there not great scripts but they do there job in a more simplier method (Not as efficent) but they should be easier to read and see what there doing. This is because I've only figured out the basics so it takes me 50 lines of repetive stuff that 3 lines of more complex code to do. :DL

ERPP8
05-28-10, 06:01 PM
I keep asking myself that everyday. Best advice I can give is to look at the stock scripts and other peoples scripts. Pick a feature out of them you'ld like to replicate and trace that function through the script - copying the relevant parts into say notepad.
Then change all the item valuse to match your items you want to control.
Its difficult but possible - you can expect a lot of hair pulling due to countless script errors.
But stick with it and sonner or later you'll get it to work.

Have a look at my scripts in my UI - there not great scripts but they do there job in a more simplier method (Not as efficent) but they should be easier to read and see what there doing. This is because I've only figured out the basics so it takes me 50 lines of repetive stuff that 3 lines of more complex code to do. :DL
I was wondering about more complex things though, like in a new type of sub (type 2) you would get missions closer to home because of low fuel

SteelViking
05-28-10, 06:17 PM
Thanks for the advice/resources guys. I can do real simple scripting, especially if I look at other's work, but the second it gets complicated at all, I get totally confused. Funny thing is, I have really only been doing mod work for about a week and a half.:haha: I might be setting my sights too high right now.

reaper7
05-28-10, 06:34 PM
Thats the same level for me too.:haha: If only there was some resourse for SH5 regards the scripting command, wrappers and functions that can be used.

kylania
05-28-10, 06:47 PM
Thats the same level for me too.:haha: If only there was some resourse for SH5 regards the scripting command, wrappers and functions that can be used.

Kinda like BIS's COMREF (http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2) for ArmA2. :shifty:

ERPP8
05-28-10, 06:57 PM
What I really want to know are the commands that are useful for modding

TheDarkWraith
05-28-10, 07:06 PM
Thanks for the advice/resources guys. I can do real simple scripting, especially if I look at other's work, but the second it gets complicated at all, I get totally confused. Funny thing is, I have really only been doing mod work for about a week and a half.:haha: I might be setting my sights too high right now.

Yes you are. Scripting IS programming. If you have no programming experience then you need to learn the basics first. Unfortunately there are no defined basics for SH5. But best thing you can do is get your self a beginner's guide to python. That will help a lot.

Python is much easier than C++ and C# that's for sure but it's also less powerful. Python and IronPython are great languages though for extending (scripting) a game like the devs have done with SH5.

reaper7
05-28-10, 07:30 PM
Kinda like BIS's COMREF (http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2) for ArmA2. :shifty:

Now thats exactly whats needed here, if only :know:

TheDarkWraith
05-28-10, 07:34 PM
Kinda like BIS's COMREF (http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2) for ArmA2. :shifty:

The script manager provides everything you need minus the basics :yep: How do you think I learned how to do the things I have done with SH5? Experimentation. I pick out items from the script manager and play with them until I figure them out.

reaper7
05-28-10, 08:01 PM
The script manager provides everything you need minus the basics :yep: How do you think I learned how to do the things I have done with SH5? Experimentation. I pick out items from the script manager and play with them until I figure them out.

Still very complicated to figure out how to construct the commands correctly.
Its a pity the Devs didn't show a basic construct for each command type at least.
My Experimentation usually leads to loss of work and reinstallation :haha:.

SteelViking
05-28-10, 11:14 PM
Still very complicated to figure out how to construct the commands correctly.
Its a pity the Devs didn't show a basic construct for each command type at least.
My Experimentation usually leads to loss of work and reinstallation :haha:.

Aye, just integrating some simple stuff into existing work has already caused me a couple reinstalls :haha::wah:

ERPP8
05-29-10, 08:52 AM
Whenever I edit a script in the in game editor it crashes