25. Apr 2024, 12:57 Hallo Gast.
Willkommen Gast. Bitte einloggen oder registrieren. Haben Sie Ihre Aktivierungs E-Mail übersehen?

Einloggen mit Benutzername, Passwort und Sitzungslänge. Hierbei werden gemäß Datenschutzerklärung Benutzername und Passwort verschlüsselt für die gewählte Dauer in einem Cookie abgelegt.


Select Boards:
 
Language:
 


Autor Thema: Coding in Edain 4.00  (Gelesen 42417 mal)

calsash

  • Heiler von Imladris
  • **
  • Beiträge: 232
  • "The tower guard shall take up the call!"
Re: Coding in Edain 4.00
« Antwort #60 am: 26. Feb 2016, 22:28 »
Did I ever write that the button wouldn't work? ;)
I wrote that it is black (or invisible), so I wrote exactly what you wrote: The texture doesn't work.

Believe me: I've done enough map.ini coding to know what I'm talking about. :P ( 6 years ago I did my first big map.ini :P (40.000+ lines))
Jesus 40k lines XD
"I would have followed you my brother my captain my king"

Glorfindel23

  • Edain Team
  • Veteran von Khazad-Dûm
  • *****
  • Beiträge: 640
Re: Coding in Edain 4.00
« Antwort #61 am: 26. Feb 2016, 22:31 »
Did I ever write that the button wouldn't work? ;)
I wrote that it is black (or invisible), so I wrote exactly what you wrote: The texture doesn't work.

Believe me: I've done enough map.ini coding to know what I'm talking about. :P ( 6 years ago I did my first big map.ini :P (40.000+ lines))

The button is working perfectly ann his texture also look :
The probleme is not this







(My problem is not the button, I want change the texture of the armor of the unit in the game  :) )

Gnomi

  • Administrator
  • Bewahrer des roten Buches
  • *****
  • Beiträge: 12.617
Re: Coding in Edain 4.00
« Antwort #62 am: 26. Feb 2016, 22:37 »
Therefore you have to change the whole skin. Via map.ini you can just use another skin, so you can only swap one skin with another, not change a skintake only parts of a skin. on 3rdage is a good tutorial for that.

Glorfindel23

  • Edain Team
  • Veteran von Khazad-Dûm
  • *****
  • Beiträge: 640
Re: Coding in Edain 4.00
« Antwort #63 am: 26. Feb 2016, 23:08 »
Therefore you have to change the whole skin. Via map.ini you can just use another skin, so you can only swap one skin with another, not change a skintake only parts of a skin. on 3rdage is a good tutorial for that.

Thank you for your answers fast ! I go to see :)

________________________ ________________________ __

If someone is interested, I've resolved my problem "how to add the transparancy for one tree :

my code :

Zitat
Object TreeShire01

RemoveModule ModuleTag_Opt_01
  ; *** ART Parameters ***
  ;------ This was done because we needed to add fade effect to tree.
;  Draw                  = W3DTreeDraw ModuleTag_Opt_01
;    ModelName = SB_Tree01
;    TextureName = SB_Trees.tga
;
;    DoTopple         = Yes
;    ToppleFX         = FX_ToppleTree
;    BounceFX         = FX_TreeBounce
;    KillWhenFinishedToppling = No
;    SinkDistance     = 9;
;    SinkTime         = DEFAULT_TREE_SINK_TIME
;  End

ReplaceModule ModuleTag_01
  Draw                  = W3DScriptedModelDraw ModuleTag_01New 

  StaticModelLODMode = yes

 
    DefaultModelConditionSta te
      Model             = SB_Tree01
    End

    ModelConditionState = PASSENGER CLUB
      Model = None
    End

    AnimationState = PASSENGER CLUB
      EnteringStateFX = FX_TreeBecomeClub
    End

    AnimationState = PASSENGER
      EnteringStateFX = FX_TreePickUp
    End
   
    ; These are the model conditions and animation states required for trees that can burn. 
    ModelConditionState = BURNED
      Model = SB_Tree01 ; use default nondeath model in place of this.
    End

    AnimationState   = AFLAME ;Currently on fire
      ParticleSysBone     = None FireTreeSmall
      ParticleSysBone     = None TreeEmbers
    End

    AnimationState   = DYING BURNED ;Currently on fire
      ParticleSysBone     = None FireTreeSmall
      ParticleSysBone     = None TreeEmbers
    End
    ; End of stuff required for burn. 

        StaticSortLevelWhileFadi ng = 2
    AlphaCameraFadeOuterRadi us = 600
    AlphaCameraFadeInnerRadi us = 200
    AlphaCameraAtInnerRadius = 10%
  End
End
 
  ;Behavior = FireWeaponCollide ModuleTag_03
  ;  CollideWeapon  = TreeFireDealDamageWeapon
  ;  RequiredStatus = AFLAME       ; I can only fire if I am on fire
  ;End
 
  ; *** DESIGN parameters ***
  DisplayName      = OBJECT:Prop
  EditorSorting    = SHRUBBERY
  CrushableLevel   = 1 ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

; SupplyOverride = 10 ; This overrides the value in gamedata.ini
   
  ArmorSet
    Conditions      = None
    Armor           = NoArmor
  End

  TransportSlotCount  = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  ; *** ENGINEERING parameters ***
; KindOf           = SHRUBBERY IMMOBILE CLUB TREE SELECTABLE;
  KindOf           = SHRUBBERY IMMOBILE CLUB SELECTABLE;

  ; Note no SwayBehavior, as this is handled in the W3DTreeBuffer.
AddModule ModuleTag_SEE
    Behavior = SlowDeathBehavior ModuleTag_SEE
        DeathTypes = ALL
        SinkDelay = 1000
        SinkRate = 8     ; in Dist/Sec
        DestructionDelay = 4000
    End
End

AddModule ModuleTag_CMB
    Behavior = CastleMemberBehavior ModuleTag_CMB
    End
End


;  Shadow              = SHADOW_DECAL
  InstanceScaleFuzziness = 0.1
 
End

calsash

  • Heiler von Imladris
  • **
  • Beiträge: 232
  • "The tower guard shall take up the call!"
Re: Coding in Edain 4.00
« Antwort #64 am: 26. Feb 2016, 23:22 »
Im still having no luck with the command set :/

Object ElvenBarracks
 CommandSet = LothlorienBarracksComman dSetNewName
End

CommandSet LothlorienBarracksComman dSetNewName
InitialVisible = 8
    1      = Command_ConstructBruchta lSchwertkämpferHorde_Sum moned
    2      = Command_ConstructLothlor ienBerserkerHorde
    3      = Command_ConstructElvenKn ightHorde
    4      = Command_ConstructDorwini onNaturmagier
    5      = Command_ConstructDorwini onWinzer
    6      = Command_StartCitadelSelf Repair     
    7      = Command_ConstructLindonW arriorHorde
    8      = Command_ConstructHeavenW arriorHorde
End     
"I would have followed you my brother my captain my king"

Glorfindel23

  • Edain Team
  • Veteran von Khazad-Dûm
  • *****
  • Beiträge: 640
Re: Coding in Edain 4.00
« Antwort #65 am: 27. Feb 2016, 00:11 »
Edited
I had not seen the first time but all your code is false I've make a correction

Im still having no luck with the command set :/

Object ElvenBarracks
 CommandSet = LothlorienBarracksComman dSetNewName
End

CommandSet LothlorienBarracksComman dSetNewName
InitialVisible = 8
    1      = Command_ConstructBruchta lSchwertkämpferHorde_Sum moned
    2      = Command_ConstructLothlor ienBerserkerHorde
    3      = Command_ConstructElvenKn ightHorde
    4      = Command_ConstructDorwini onNaturmagier
    5      = Command_ConstructDorwini onWinzer
    6      = Command_StartCitadelSelf Repair     
    7      = Command_ConstructLindonW arriorHorde
    8      = Command_ConstructHeavenW arriorHorde
End   

You must delete the "Summoned" because it doesn't exist in the ini file

New code :

Or if you want continue with the "summoned" you must create his button like it doesn't exist :

New code :


Important : your major problem is the command you must open the "commandbutton.inc" and in this you must search the command than you want use
« Letzte Änderung: 27. Feb 2016, 00:18 von Glorfindel23 »

calsash

  • Heiler von Imladris
  • **
  • Beiträge: 232
  • "The tower guard shall take up the call!"
Re: Coding in Edain 4.00
« Antwort #66 am: 27. Feb 2016, 00:35 »
Working now so thank you for enduring with me Glorfindel. There is however 1 flaw which is that no upgrades for the unit can be purchased where as they can be if the unit is on the map.

Also one more thing im not sure if this is coding or not but how would i make it so that when you capture a flag a timer will start and after that timer some units will appear?
"I would have followed you my brother my captain my king"

Gnomi

  • Administrator
  • Bewahrer des roten Buches
  • *****
  • Beiträge: 12.617
Re: Coding in Edain 4.00
« Antwort #67 am: 27. Feb 2016, 09:48 »
This is scriting. Therefore give the flag a name and set a waypoint (this is where the units start) and open the scripting menu in the worldbuilder.
Script 1:

Script conditions:
If Unit 'Flagname' belongs to player 'Playername'
then
Actions if TRUE:
start timer 'Troupsarrive' with 'XXX' seconds

Script 2:
If Timer Troupsarrive is finished
then
spawn units


Spawn units can be different things:
Either you just spawn the units (spawn unit xyz at waypoint 'spawnname').
Or you spawn a whole team. Therefore you go to the team-editor first, go to the player which should get the units and add a new team. Then you can give this team units, f.e. min 1, max 1 Mordorfighterhorde.
Afterwards you say in the script:
Spawn an instance of team 'teamname'.

If you want the units to move in the map you have to additionally set a waypointpath (klick on the spawnpoint with the waypopinttool, hold it and pull the mouse somewhere else. A second waypoint will appear and a red arrow.)
Now you have to name the waypointpath and add as a second action:
Have team/unit follow waypointpath.

or you just add another waypoint and say: move team/unit to waypoint)


They can't get upgrades, because it isn't defined in the inis.^^ You have to add the upgrades to the unit with the inis. I personally would say: Try it yourself, you learn most by doing it yourself^^)

calsash

  • Heiler von Imladris
  • **
  • Beiträge: 232
  • "The tower guard shall take up the call!"
Re: Coding in Edain 4.00
« Antwort #68 am: 27. Feb 2016, 09:59 »
This is scriting. Therefore give the flag a name and set a waypoint (this is where the units start) and open the scripting menu in the worldbuilder.
Script 1:

Script conditions:
If Unit 'Flagname' belongs to player 'Playername'
then
Actions if TRUE:
start timer 'Troupsarrive' with 'XXX' seconds

Script 2:
If Timer Troupsarrive is finished
then
spawn units


Spawn units can be different things:
Either you just spawn the units (spawn unit xyz at waypoint 'spawnname').
Or you spawn a whole team. Therefore you go to the team-editor first, go to the player which should get the units and add a new team. Then you can give this team units, f.e. min 1, max 1 Mordorfighterhorde.
Afterwards you say in the script:
Spawn an instance of team 'teamname'.

If you want the units to move in the map you have to additionally set a waypointpath (klick on the spawnpoint with the waypopinttool, hold it and pull the mouse somewhere else. A second waypoint will appear and a red arrow.)
Now you have to name the waypointpath and add as a second action:
Have team/unit follow waypointpath.

or you just add another waypoint and say: move team/unit to waypoint)


They can't get upgrades, because it isn't defined in the inis.^^ You have to add the upgrades to the unit with the inis. I personally would say: Try it yourself, you learn most by doing it yourself^^)
Thank you Gnomi 1 more question should the flag be neutral? because for some reason i cant actually capture the flag.
« Letzte Änderung: 27. Feb 2016, 10:26 von calsash »
"I would have followed you my brother my captain my king"

Gnomi

  • Administrator
  • Bewahrer des roten Buches
  • *****
  • Beiträge: 12.617
Re: Coding in Edain 4.00
« Antwort #69 am: 27. Feb 2016, 14:08 »
To capture a flag, there need to be a building right beside it which can be captured. If there is no capturable building the flag can't be captured. (either you make a building capturable or you just place an inn, scale it to 0.01 and z=-1 (or something else so you don't see it) and make it not selectable.

calsash

  • Heiler von Imladris
  • **
  • Beiträge: 232
  • "The tower guard shall take up the call!"
Re: Coding in Edain 4.00
« Antwort #70 am: 28. Feb 2016, 13:04 »
To capture a flag, there need to be a building right beside it which can be captured. If there is no capturable building the flag can't be captured. (either you make a building capturable or you just place an inn, scale it to 0.01 and z=-1 (or something else so you don't see it) and make it not selectable.
Are these scripts correct
SCRIPT 1
IF
Unit 'White Council' (name of flag) is owned by player_1 *AND* true.
THEN
Null operation(does nothing)
Set timer 'Troupsarrive' to expire in 100 frames.

SCRIPT 2
IF
Timer 'Troupsarrive' has expired.
*AND* True.
THEN
Null operation(does nothing)
Spawn an instance of Team 'Player0001/teamplayer0001' at waypoint 'Council spawn'

Those are what i have and it didnt seem to work when I capped the flag, sorry for all this bother.
"I would have followed you my brother my captain my king"

Gnomi

  • Administrator
  • Bewahrer des roten Buches
  • *****
  • Beiträge: 12.617
Re: Coding in Edain 4.00
« Antwort #71 am: 28. Feb 2016, 13:21 »
What exactly doesn't work?
Do troups arrive at the wrong time or not at all? Best thing is to upload the map, then I can look at it directly.

Also I wouldn't use the frame timer, but the second timer (a second has about 5 frames).




I think this could be the problem:
Have you used "Add skirmish players"?
If no, then delete your players and DO IT.
"player_1" is probably not the real Player_1 which starts at start point 1. Additionally Player0001 is also not the Player_1.

DrHouse93

  • Elronds Berater
  • **
  • Beiträge: 336
Re: Coding in Edain 4.00
« Antwort #72 am: 28. Feb 2016, 13:30 »
Just remove the TRUE and NULL OPERATION commands. They're not required to make the script working.

But, as Gnomi said, you must add the correct Skirmish Players. Furthermore, the reinforcement army should belong to Player_1, but also to a different team (to add it, just click on the button with three guys on the top right corner of the Worldbuilder, select Player_1, and then Add new team. Then, in the bottom part of the window, you can select all the units you want to make them spawn with the team (just ignore the Max tab, because the game will consider just the Min one))

If you have any difficulties I can post a screen of it :)

calsash

  • Heiler von Imladris
  • **
  • Beiträge: 232
  • "The tower guard shall take up the call!"
Re: Coding in Edain 4.00
« Antwort #73 am: 28. Feb 2016, 13:32 »
Ah thank you and yeah i did add skirmish players i just got confused about whether the reinforcements had to be  a different team or not.
"I would have followed you my brother my captain my king"

DrHouse93

  • Elronds Berater
  • **
  • Beiträge: 336
Re: Coding in Edain 4.00
« Antwort #74 am: 28. Feb 2016, 13:34 »
If I'm not mistaking, "teamPlayer1" should be Player_1's starting units/buildings, so that's why you should make the reinforcements belong to another team :)