Author Topic: *Scripting Thread*  (Read 87693 times)

0 Members and 1 Guest are viewing this topic.

Offline Harybo

  • Donator
  • *
  • Posts: 169
    • View Profile
  • Side: Confederacy
Re: *Scripting Thread*
« Reply #30 on: August 13, 2013, 01:22:15 pm »
Hi im sort of a noob to coding and scripting so i just have a question. I know that coding in terms of NW means changing unit and faction names etc., and am guessing that scripting more has to do with making certain specific events happen, but  what are more specifically the main differences between coding and scripting?

Offline BSM 'Shut up' Williams

  • First Lieutenant
  • *
  • Posts: 2819
  • Bóg, Honor, Ojczyzna!
    • View Profile
    • My Twitter
  • Nick: Jean Grande
  • Side: Union
Re: *Scripting Thread*
« Reply #31 on: August 13, 2013, 06:51:00 pm »
Hi im sort of a noob to coding and scripting so i just have a question. I know that coding in terms of NW means changing unit and faction names etc., and am guessing that scripting more has to do with making certain specific events happen, but  what are more specifically the main differences between coding and scripting?

To me they're the same.

Steam Profile Signature
[close]

Offline Saxinger

  • Private
  • *
  • Posts: 36
  • Scripter | 3teFK_Rek_Saxinger
    • View Profile
    • Tec-Turorials
  • Nick: Saxinger
  • Side: Neutral
Re: *Scripting Thread*
« Reply #32 on: August 13, 2013, 08:01:27 pm »
Hi im sort of a noob to coding and scripting so i just have a question. I know that coding in terms of NW means changing unit and faction names etc., and am guessing that scripting more has to do with making certain specific events happen, but  what are more specifically the main differences between coding and scripting?

To me they're the same.

+1

Offline Gokiller

  • Almost Pride of Ni
  • Major General
  • **
  • Posts: 3913
  • Bydand in the chat lads!
    • View Profile
  • Side: Neutral
Re: *Scripting Thread*
« Reply #33 on: August 13, 2013, 08:36:09 pm »
They are basicly the same. However, (to me atleast) to be more exact.

Scripting is creating features from scratch, (random example: implenting a testudo formation for a Roman mod). Coding, implenting items, and the rest.

This is the way I see it, I could be wrong but that shouldn't really matter.

Offline Harybo

  • Donator
  • *
  • Posts: 169
    • View Profile
  • Side: Confederacy
Re: *Scripting Thread*
« Reply #34 on: August 14, 2013, 12:11:29 pm »
oh ok i see then i guess it was less complicated than i thought
thanks

Offline DanyEle

  • FSE Associate
  • ***
  • Posts: 517
  • Sssh! I'm coding, don't disturb :D
    • View Profile
  • Nick: DanyEle
  • Side: Confederacy
Re: *Scripting Thread*
« Reply #35 on: August 15, 2013, 10:29:38 pm »
They are basicly the same. However, (to me atleast) to be more exact.

Scripting is creating features from scratch, (random example: implenting a testudo formation for a Roman mod). Coding, implenting items, and the rest.

This is the way I see it, I could be wrong but that shouldn't really matter.

Yeah, for example something i just did was creating a sniper rifle system for NW. I think that's scripting. Coding means modifying existing parameters, adding a few tweaks, fixing bugs and so on.... Ah, saying scripting makes you have more swag  8)



Offline El_Presidente

  • Colonel
  • *
  • Posts: 2067
  • David
    • View Profile
  • Side: Neutral
Re: *Scripting Thread*
« Reply #36 on: August 18, 2013, 02:47:17 pm »
Would it be possible to write a script that could actively disable units in the game, for the AI ? So say once a certain condition was met, on the next round the AI could only spawn as foot guards vs normal line infantry in the previous round?

Here is a kind of broken, not realistic pseudo-code that might give you an idea more of what I'm talking about:

Spoiler
Code
TotalRounds = int(TotalRounds) #The actual thing will be an intiger already, but oh well  :P.

if TotalRounds is between 0 and 2:
     AISpawnAsLineInfantry = True
     AISpawnAsFootGuard = False

if TotalRounds is between 3 and 5:
     AISpawnAsLineInfantry = False
     AISpawnAsFootGuard = True
[close]

I know all the variable names are wrong etc, and it's probably full of syntax errors but it's meant to be a rough example! I'm trying to rewrite the code for siege into an invasion-styled script and this is the most practical method I can devise. The only reason I, personally, can only see it wouldn't work is that actively updating what the AI can play as is impossible/would have to be a heavy modification - but I don't know. I've never tried modding before, I'm used to writing my own programs in python from scratch and this is awfully alien to me  ;).

Why can't the game just use simple Boolean values like I do?
« Last Edit: August 18, 2013, 03:06:48 pm by El_Presidente »

Offline SeanBeansShako

  • Major
  • *
  • Posts: 3185
    • View Profile
  • Side: Union
Re: *Scripting Thread*
« Reply #37 on: August 18, 2013, 06:34:24 pm »
I have an interesting suggestion what about a script for client side that replaces the regimental standard with the image of your regiments chosen banner instead?

And a 2nd suggestion, a script that gives the banner a green halo around the edges if they pick an officer class?

Offline Brawn

  • First Sergeant
  • *
  • Posts: 237
  • The Princess of trash, and schedule two narcotics.
    • View Profile
  • Nick: Dobson
  • Side: Confederacy
Re: *Scripting Thread*
« Reply #38 on: August 22, 2013, 09:15:58 pm »
I have a scripting question, ehem, will you be my mod's scripter? O.o

Jking of course, but I do have a question.

How do do you give a class that would normally spaw with one gun, spawn with another?
Ex.) Russian jaegers can spawn with a rifle and a cavalry musket, dependent on which one is chosen.
« Last Edit: August 24, 2013, 10:33:12 pm by Brawn »

Offline DanyEle

  • FSE Associate
  • ***
  • Posts: 517
  • Sssh! I'm coding, don't disturb :D
    • View Profile
  • Nick: DanyEle
  • Side: Confederacy
Re: *Scripting Thread*
« Reply #39 on: August 25, 2013, 03:04:35 pm »
Just assign that weapon to that troop.



Offline Richard_Miller

  • First Lieutenant
  • *
  • Posts: 1099
  • Traitor troooollll #BStrongCoony
    • View Profile
  • Side: Neutral
Re: *Scripting Thread*
« Reply #40 on: August 28, 2013, 05:00:39 pm »
i was told there was a way to make items like spy glasses useable in the map could i have some help pls  :-\

Offline BSM 'Shut up' Williams

  • First Lieutenant
  • *
  • Posts: 2819
  • Bóg, Honor, Ojczyzna!
    • View Profile
    • My Twitter
  • Nick: Jean Grande
  • Side: Union
Re: *Scripting Thread*
« Reply #41 on: August 28, 2013, 05:03:47 pm »
You right click with the spy-glass and Eureka it's usable.  ;)

Steam Profile Signature
[close]

Offline Richard_Miller

  • First Lieutenant
  • *
  • Posts: 1099
  • Traitor troooollll #BStrongCoony
    • View Profile
  • Side: Neutral
Re: *Scripting Thread*
« Reply #42 on: August 28, 2013, 05:36:16 pm »
You right click with the spy-glass and Eureka it's usable.  ;)

*face palm*

Offline Brawn

  • First Sergeant
  • *
  • Posts: 237
  • The Princess of trash, and schedule two narcotics.
    • View Profile
  • Nick: Dobson
  • Side: Confederacy
Re: *Scripting Thread*
« Reply #43 on: August 28, 2013, 09:02:11 pm »
You right click with the spy-glass and Eureka it's usable.  ;)

-1

Offline DanyEle

  • FSE Associate
  • ***
  • Posts: 517
  • Sssh! I'm coding, don't disturb :D
    • View Profile
  • Nick: DanyEle
  • Side: Confederacy
Re: *Scripting Thread*
« Reply #44 on: September 07, 2013, 01:20:54 am »
Scrpting question: how can I make a deployed item(which uses the same system of the rocket launcher) disappear once i click the reset button? Where do i need to get its instance and then clean it up? (I think this has to do with the script clean_up_prop_instance, but i have no idea where to apply it).
« Last Edit: September 07, 2013, 01:26:27 am by DanyEle »