Conquer Club

A question for all you scriptwriters

Archival storage to keep things organized and uncluttered. Can't find what you need? Search for old topics here.

Moderator: Tech Team

Forum rules
Please read the Community Guidelines before posting.

A question for all you scriptwriters

Postby Draconian_Intel on Thu Aug 21, 2008 9:06 pm

Where did you learn to write user scripts? I am an amateur programmer, and it would seem fun to learn how to do this kind of thing. I was just wondering where others learned so that I could try and find a good place to learn. I know a decent amount of C and C++, as well as Visual Basic , and I'm just starting to learn Java (not sure if those will help at all).
Corporal Draconian_Intel
 
Posts: 79
Joined: Sat Jun 21, 2008 11:00 pm

Re: A question for all you scriptwriters

Postby yeti_c on Fri Aug 22, 2008 12:05 am

Java will be your main help - as it will teach you syntax (although it's not overtly disimilar to C++(C))...

The other thing Java will give you - if you're using it for an Web application is that you will use Javascript (which is what the scripts are written in) and give you knowledge of (X/D)HTML which is what the scripts do!

The other way of learning - is simply - Doing!!

Take a look at the contents of the scripts (start with a simple one like "Saved Searches") and see if you can see what is happening.

Then try BOB - see if you can think about changing something - i.e. the location of something - or the calculation of something etc...

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Re: A question for all you scriptwriters

Postby Draconian_Intel on Fri Aug 22, 2008 1:28 pm

Ok yeti, thanks, I will try that.
Corporal Draconian_Intel
 
Posts: 79
Joined: Sat Jun 21, 2008 11:00 pm

Re: A question for all you scriptwriters

Postby Pedronicus on Sat Aug 23, 2008 7:33 am

I've got a question for the script writers.

Do you get paid by Lack for your work?
Image
Highest position 7th. Highest points 3311 All of my graffiti can be found here
Major Pedronicus
 
Posts: 2080
Joined: Tue Jan 24, 2006 2:42 pm
Location: Busy not shitting you....

Re: A question for all you scriptwriters

Postby lancehoch on Sat Aug 23, 2008 9:21 am

I am not a script writer, but no they don't. They do this out of the kindness of their hearts.
Sergeant lancehoch
 
Posts: 4183
Joined: Wed Dec 05, 2007 4:13 pm

Re: A question for all you scriptwriters

Postby yeti_c on Sat Aug 23, 2008 11:37 am

Pedronicus wrote:I've got a question for the script writers.

Do you get paid by Lack for your work?


No - Although - Lack did give me a year for converting Old BOB into AJAX BOB - that was a public offer and I took up the gauntlet!!

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Re: A question for all you scriptwriters

Postby Draconian_Intel on Tue Aug 26, 2008 8:06 pm

Ok, so I have learned a fair amount of javascript now, and so I can understand the basic idea of what some of the code means.

Now though, I need some help finding a cheat sheet of sorts, something that tells we what all the javascript keywords are and what they do. For example, it took me something like half an hour to figure out what GetElementByID was.

Another thing that I am curious about is how the javascripts interact with CC. For example: How does the javascript get access to the game log?

I think part of my problems come from a lack of knowledge on how this site works, and my very basic knowledge of HTML, so anyway you can help me with these as well would be appreciated, but especially the first two things.
Image
Corporal Draconian_Intel
 
Posts: 79
Joined: Sat Jun 21, 2008 11:00 pm

Re: A question for all you scriptwriters

Postby Snorri1234 on Tue Aug 26, 2008 8:11 pm

Well I've been trying to get my scripts into hollywood, but so far noone seems interrested in a movie about a ex-CIA, ex-PETA agent who is down on his luck and has resorted into alcoholism since his wife won't let him see his daughter and he's also an expert martial artist who saw his whole family killed and vowed to fight injustice even when the perpetrators are psychopaths who wear make-up.

It's a hard world out there.
"Some motherfuckers are always trying to ice skate uphill."

Duane: You know what they say about love and war.
Tim: Yes, one involves a lot of physical and psychological pain, and the other one's war.
User avatar
Private Snorri1234
 
Posts: 3438
Joined: Wed Sep 12, 2007 11:52 am
Location: Right in the middle of a fucking reptile zoo.

Re: A question for all you scriptwriters

Postby Draconian_Intel on Tue Aug 26, 2008 8:19 pm

I'm not sure if that had anything to do with my topic besides having the word script in it.....

Anyway, the request still stands for someone to fill these needs:
1. I need a way to learn more javascript keywords and their purposes,
2. I need to learn more about how this site works as well as how the javascript can interact with it,
3. and I finally need a way to learn all or most of the HTML I need to write user scripts effectively.
(I have found that it can be useful to reiterate something in different ways to make it clearer).
Image
Corporal Draconian_Intel
 
Posts: 79
Joined: Sat Jun 21, 2008 11:00 pm

Re: A question for all you scriptwriters

Postby lancehoch on Wed Aug 27, 2008 12:38 am

Again, not a script writer myself, but I have done coding before. The best way to learn the keywords in a language is to google a tutorial (one of the first links I got was this). As to how the site works, (I am using firefox, so if you are using IE or something else, this may not work) go to view > page source. This should give you a feel for how the elements of the site are laid out.
Sergeant lancehoch
 
Posts: 4183
Joined: Wed Dec 05, 2007 4:13 pm

Re: A question for all you scriptwriters

Postby Draconian_Intel on Wed Aug 27, 2008 12:59 am

I did use that tutorial, but I missed that section #-o , thanks for pointing it out.

As for your suggestion on how to learn the site's layout, I followed your advice and found out just how little I really know about website making. :( Maybe this will be the drive I need to finally learn it. :P

Looks like I still have a ways to go before I am able to do much in the way of useful coding. If I have any more questions, I will post them here.

P.S. feel free to respond to any of my old questions if you have a different response.
Image
Corporal Draconian_Intel
 
Posts: 79
Joined: Sat Jun 21, 2008 11:00 pm

Re: A question for all you scriptwriters

Postby yeti_c on Wed Aug 27, 2008 2:59 am

OK - here's a few hints for ya.

1) Get Firebug -> Use the inspect tool - it will teach you the site a lot (https://addons.mozilla.org/en-US/firefox/addon/1843).
2) http://www.w3schools.com/ - Great resource site.
3) If you find some standard code that you don't understand - throw it into google and see what the search gets you.

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Re: A question for all you scriptwriters

Postby Draconian_Intel on Wed Aug 27, 2008 3:31 pm

Ok, I will look into that as well. Thanks to both of you for your ideas.
Image
Corporal Draconian_Intel
 
Posts: 79
Joined: Sat Jun 21, 2008 11:00 pm

Re: A question for all you scriptwriters

Postby yeti_c on Thu Aug 28, 2008 12:58 am

Draconian_Intel wrote:Ok, I will look into that as well. Thanks to both of you for your ideas.


Don't look into it - get Firebug... you'll understand what I mean - I can't live without it these days!!!

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Re: A question for all you scriptwriters

Postby Draconian_Intel on Thu Aug 28, 2008 12:54 pm

Well, I got it, but I'm not sure what I'm looking at. I am trying to learn more HTML/CSS/anything website related right now, which is giving me a better understanding of the information presented by Firebug, but its still Greek to me.

I have learned a lot by trying to become a scriptwriter, but I have also learned that I don't nearly enough.
Image
Corporal Draconian_Intel
 
Posts: 79
Joined: Sat Jun 21, 2008 11:00 pm

Re: A question for all you scriptwriters

Postby yeti_c on Fri Aug 29, 2008 1:37 pm

Use the inspect tool...

And look in the console - you will see that the HTML tags become like a tree structure - this is how you can navigate around the page element by element.

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Re: A question for all you scriptwriters

Postby Draconian_Intel on Fri Aug 29, 2008 3:26 pm

Wow, this is a nice tool. I'm learning a lot. I notice that most of the time, the inspect tool highlights the stuff on the page in light blue, but sometimes it does other colors as well. Is there a color-code? Actually, is there a good tutorial or something that will help me learn how to use this better? I did google it, but I didn't see a lot that gave this kind of info.
Image
Corporal Draconian_Intel
 
Posts: 79
Joined: Sat Jun 21, 2008 11:00 pm

Re: A question for all you scriptwriters

Postby Draconian_Intel on Sat Aug 30, 2008 4:48 pm

I can understand how Saved Searches works! :D I doubt that I could write anything that complex right now, but it gives me new encouragement that I will eventually. Hopefully there will still be a user script worth writing then.
Image
Corporal Draconian_Intel
 
Posts: 79
Joined: Sat Jun 21, 2008 11:00 pm

Re: A question for all you scriptwriters

Postby chipv on Sat Aug 30, 2008 5:14 pm

Draconian_Intel wrote:I can understand how Saved Searches works! :D I doubt that I could write anything that complex right now, but it gives me new encouragement that I will eventually. Hopefully there will still be a user script worth writing then.


Outstanding! Saved Searches isn't actually as easy at it might sound on the face of it, so I think you've done really well.
User avatar
Major chipv
Head Tech
Head Tech
 
Posts: 2894
Joined: Mon Apr 28, 2008 5:30 pm

Re: A question for all you scriptwriters

Postby Scott-Land on Sat Aug 30, 2008 5:36 pm

I have a question as well- is there anyway to copy the terr's on the map to paste in team chat?
User avatar
Major Scott-Land
 
Posts: 2423
Joined: Tue Jan 23, 2007 9:37 pm

Re: A question for all you scriptwriters

Postby chipv on Sat Aug 30, 2008 5:47 pm

Scott-Land wrote:I have a question as well- is there anyway to copy the terr's on the map to paste in team chat?


You could use the map .xml , would that be good enough? Or do yo need army counts in which case use BOB Text Map

What exactly do you need to paste?
User avatar
Major chipv
Head Tech
Head Tech
 
Posts: 2894
Joined: Mon Apr 28, 2008 5:30 pm

Re: A question for all you scriptwriters

Postby Scott-Land on Sun Aug 31, 2008 9:02 am

chipv wrote:
Scott-Land wrote:I have a question as well- is there anyway to copy the terr's on the map to paste in team chat?


You could use the map .xml , would that be good enough? Or do yo need army counts in which case use BOB Text Map

What exactly do you need to paste?



With all the new maps, it'd be nice to be able to copy the name of the territory from the map itself and paste it in team chat. Right now I cant highlight the terr's names to do it- complicated names on the newer maps in like Ussr and Iceland. I'm not sure how else to explain it. :oops:

Also another question about your Map Ranks- no way to configure how many kills a players made ( not Unique defeats) ?
User avatar
Major Scott-Land
 
Posts: 2423
Joined: Tue Jan 23, 2007 9:37 pm

Re: A question for all you scriptwriters

Postby chipv on Sun Aug 31, 2008 9:15 am

Scott-Land wrote:
chipv wrote:
Scott-Land wrote:I have a question as well- is there anyway to copy the terr's on the map to paste in team chat?


You could use the map .xml , would that be good enough? Or do yo need army counts in which case use BOB Text Map

What exactly do you need to paste?



With all the new maps, it'd be nice to be able to copy the name of the territory from the map itself and paste it in team chat. Right now I cant highlight the terr's names to do it- complicated names on the newer maps in like Ussr and Iceland. I'm not sure how else to explain it. :oops:

Also another question about your Map Ranks- no way to configure how many kills a players made ( not Unique defeats) ?


If it's only the name you want to paste just copy the name from the Text Map in BOB. (BOB menu on the game page -> View Options -> Text Map Standard or Extended)

Map Rank does actually already store non-unique kills for the kill ratio.

Kill ratio = kills/ kills + losses so

kills = (kill ratio x losses) / (1 - kill ratio)

So this is a rough number because kill ratio is rounded, but an accurate number would not be a problem since map rank already stores the value of the number of kills.
User avatar
Major chipv
Head Tech
Head Tech
 
Posts: 2894
Joined: Mon Apr 28, 2008 5:30 pm

Re: A question for all you scriptwriters

Postby Scott-Land on Sun Aug 31, 2008 9:21 am

chipv wrote:
Scott-Land wrote:
chipv wrote:
Scott-Land wrote:I have a question as well- is there anyway to copy the terr's on the map to paste in team chat?


You could use the map .xml , would that be good enough? Or do yo need army counts in which case use BOB Text Map

What exactly do you need to paste?



With all the new maps, it'd be nice to be able to copy the name of the territory from the map itself and paste it in team chat. Right now I cant highlight the terr's names to do it- complicated names on the newer maps in like Ussr and Iceland. I'm not sure how else to explain it. :oops:

Also another question about your Map Ranks- no way to configure how many kills a players made ( not Unique defeats) ?


If it's only the name you want to paste just copy the name from the Text Map in BOB. (BOB menu on the game page -> View Options -> Text Map Standard or Extended)

Map Rank does actually already store non-unique kills for the kill ratio.

Kill ratio = kills/ kills + losses so

kills = (kill ratio x losses) / (1 - kill ratio)

So this is a rough number because kill ratio is rounded, but an accurate number would not be a problem since map rank already stores the value of the number of kills.


As usual Chip, timely and helpful. Thanks. ;)
User avatar
Major Scott-Land
 
Posts: 2423
Joined: Tue Jan 23, 2007 9:37 pm

Re: A question for all you scriptwriters

Postby Draconian_Intel on Sun Aug 31, 2008 5:01 pm

So, I have managed to understand a couple of scripts (Saved Searches and Games Filter to be exact), so I'm thinking of trying my hand at writing one (points history to be exact). I figure it will at least show me how much more I need to learn. So, my first two of many questions to come is this: is there a way to get all the game numbers a person has ever played in? Also, is there a way to access the game log without opening the game in a separate window?

I wish I could understand map rank, because I'm pretty sure all the answers I need are in there, but oh well. :(
Image
Corporal Draconian_Intel
 
Posts: 79
Joined: Sat Jun 21, 2008 11:00 pm

Next

Return to Tool Archives

Who is online

Users browsing this forum: No registered users