Currently the developers are putting their own money into JC2-MP to keep the servers online.

Please take a few seconds of your time and disable your AdBlock plugin for our website.

Ad revenue is not going to developers, it is used purely for covering our hosting costs.

 

You are also free to donate, which removes all ads from our website!

Patch 0.3 was just released! Full changelog here: https://t.co/4A50m6IKen

3 years ago

Advertisement
May 25, 2020, 10:05:05 pm

Author Topic: [0.1.4 RELEASE] Hats Demo  (Read 5544 times)

Jman100

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
[0.1.4 RELEASE] Hats Demo
« on: March 08, 2014, 01:39:47 pm »
A simple demonstration of client static objects used to make hats, and sync to other players

Use arrow keys to switch between hats. Other players will be able to see your hat.

This script demos client static objects and new player:SetNetworkValue functions.

Download from Github: https://github.com/Jman100/jc2mp-hatsdemo
« Last Edit: March 08, 2014, 01:42:19 pm by Jman100 »

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #1 on: March 09, 2014, 04:05:07 am »
Thanks.

Will the full list be posted on the wiki, or do we have to experiment?

Also, can we spawn staticobjects as hats? The Panay head kind of implied that.

Jman100

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #2 on: March 09, 2014, 05:07:40 am »
Thanks.

Will the full list be posted on the wiki, or do we have to experiment?

Also, can we spawn staticobjects as hats? The Panay head kind of implied that.

Hats are static objects ;D browse the models file that came with trix's model viewer script to find more. It's pretty easy, just look through all the cdoll files.

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #3 on: March 09, 2014, 08:33:17 am »
Thanks.

Will the full list be posted on the wiki, or do we have to experiment?

Also, can we spawn staticobjects as hats? The Panay head kind of implied that.

Hats are static objects ;D browse the models file that came with trix's model viewer script to find more. It's pretty easy, just look through all the cdoll files.
I know they are, but wanted to confirm if they could be used in this clientside feature since previously objects were only server controlled.

No one has a complete list? If a list larger than the one in your demo script has been assembled then it makes the most sense for it to be posted to the wiki. Otherwise there will be multiple scripters assembling identical lists. This is just a waste of time, time which could be better spent innovating with new features.

Jman100

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #4 on: March 09, 2014, 09:00:04 am »
Thanks.

Will the full list be posted on the wiki, or do we have to experiment?

Also, can we spawn staticobjects as hats? The Panay head kind of implied that.

Hats are static objects ;D browse the models file that came with trix's model viewer script to find more. It's pretty easy, just look through all the cdoll files.
I know they are, but wanted to confirm if they could be used in this clientside feature since previously objects were only server controlled.

No one has a complete list? If a list larger than the one in your demo script has been assembled then it makes the most sense for it to be posted to the wiki. Otherwise there will be multiple scripters assembling identical lists. This is just a waste of time, time which could be better spent innovating with new features.

The available clientside objects are the exact same objects that are available to the server objects. Only difference is they are clientside. Here is a list of available models: https://github.com/trixnz/jc2mp-model-viewer/blob/master/client/models.lua

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #5 on: March 09, 2014, 06:25:51 pm »
Something to this effect?
Code: [Select]
hats = {
"pd_arcticvillage_male1.eez/pd_arcticvillage_male-hat.lod",
"pd_arcticvillage_female1.eez/pd_arcticvillage_female-headcloth.lod",
"pd_arcticvillage_female1.eez/pd_arcticvillage_female-headcloth2.lod",
"pd_arcticvillage_female2.eez/pd_arcticvillage_female_2-hat_winter.lod",
"pd_arcticvillage_male2.eez/pd_arcticvillage_male_2-hat_winter.lod",
"pd_blackmarket.eez/pd_blackmarket-scarf.lod",
"pd_desertvillage_female1.eez/pd_desertvillage_female-shawl.lod",
"pd_desertvillage_male1.eez/pd_desertvillage_male-turban.lod",
"pd_fishervillage_male1.eez/pd_fishervillage_male-hat_fisherman.lod",
"pd_fishervillage_male1.eez/pd_fishervillage_male-ricehat.lod",
"pd_generic_female.eez/generic_female-ricehat.lod",
"pd_generic_female.eez/generic_female-shawl.lod",
"pd_generic_female_1.eez/pd_generic_female_1-hat_linen.lod",
"pd_generic_female_1.eez/pd_generic_female_1-hat_rice.lod",
"pd_generic_female_2.eez/pd_generic_female_2-hat_linen.lod",
"pd_generic_female_2.eez/pd_generic_female_2-hat_rice.lod",
"pd_generic_female_2.eez/pd_generic_female_2-hat_towel.lod",
"pd_generic_female_3.eez/pd_generic_female_3-hat_scarf.lod",
"pd_generic_female_3.eez/pd_generic_female_3-hat_straw2.lod",
"pd_generic_male.eez/pd_generic_male-hat.lod",
"pd_generic_male_1.eez/pd_generic_male_1-hat_rice.lod",
"pd_generic_male_1.eez/pd_generic_male_1-hat_linen.lod",
"pd_generic_male_1.eez/pd_generic_male_1-hat_fisherman.lod",
"pd_generic_male_2.eez/pd_generic_male_2-hat_fedora.lod",
"pd_generic_male_2.eez/pd_generic_male_2-hat_linen.lod",
"pd_generic_male_2.eez/pd_generic_male_2-hat_weird.lod",
"pd_generic_male_3.eez/pd_generic_male_3-hat_linen.lod",
"pd_ms_airport_female1.eez/pd_ms_airport_female-cap.lod",
"pd_ms_airport_female1.eez/pd_ms_airport_female-hair.lod",
"pd_ms_airport_male1.eez/pd_ms_airport_male-cap.lod",
"pd_tourist_female2.eez/pd_tourist_female-h_fisherhat.lod",
"pd_tourist_female2.eez/pd_tourist_female-h_hair.lod",
"pd_tourist_female2.eez/pd_tourist_female-h_sunglasses.lod",
"pd_tourist_male1.eez/pd_tourist_male-fisherhat.lod",
"pd_tourist_male1.eez/pd_tourist_male-sunglasses.lod",
"pd_ms_civ_strippers_female1.eez/pd_civilian_stripper_female-a_sunglasses.lod",
"pd_ms_civ_strippers_female1.eez/pd_civilian_stripper_female-ht_militarycap.lod",
"pd_ms_civ_strippers_male1.eez/pd_civilian_stripper_male-hat.lod",
"pd_ms_civ_strippers_male1.eez/pd_civilian_stripper_male-cowboyhat.lod",
"pd_ms_civ_strippers_male2.eez/pd_civilian_stripper_male-cowboyscarf.lod",
"pd_ms_doorman.eez/pd_doorman-h_bandana.lod",
"pd_ms_strippers_female1.eez/pd_stripper_female-a_sunglasses.lod",
"pd_ms_strippers_female1.eez/pd_stripper_female-h_hair1.lod",
"pd_ms_strippers_female1.eez/pd_stripper_female-h_hair2.lod",
"pd_ms_strippers_female1.eez/pd_stripper_female-ht_militarycap.lod",
"pd_ms_strippers_male1.eez/pd_ms_stripper_male-hat.lod",
"pd_ms_strippers_male1.eez/pd_ms_stripper_male-sunglasses.lod",
"pd_ms_strippers_male2.eez/pd_ms_stripper_male-cowboyhat.lod",
"pd_ms_strippers_male2.eez/pd_ms_stripper_male-cowboyscarf.lod",
"pd_gov_base01.eez/pd_gov_base-hat.lod",
"pd_gov_base01.eez/pd_gov_base-hatng.lod",
"pd_gov_elite.eez/pd_govnewfix_elite-head.lod",
"pd_gov_elite.eez/pd_govnewfix_elite-head_camo.lod",
"pd_gov_elite.eez/pd_govnewfix_elite-helmet.lod",
"pd_gov_elite.eez/pd_govnewfix_elite-beret2.lod",
"pd_ms_japaneseveterans.eez/pd_ms_japaneseveterans-helmet.lod",
"pd_panaupolice.eez/panaupolice-helmet.lod",
"pd_panaupolice.eez/panaupolice-panaupolice.lod",
"pd_panaupolice.eez/panaupolice-turban.lod",
"pd_reaperselite1.eez/pd_reapers_elite_male-beret.lod",
"pd_reaperselite1.eez/pd_reapers_elite_male-cap.lod",
"pd_roacheselite1.eez/pd_roaches_elite-h_bandana.lod",
"pd_roacheselite1.eez/pd_roaches_elite-h_headwear.lod",
"pd_ularboysbase1.eez/pd_ularboys_base_male-backpack.lod",
"pd_ularboyselite1.eez/pd_ularboys_elite_male-glasses.lod",
"pd_ularboyselite1.eez/pd_ularboys_elite_male-tshirt.lod",
"pd_generic_female_3.eez/pd_generic_female_3-hat_towel.lod",
"pd_generic_female_5.eez/pd_generic_female_5-hat_cloth.lod.lod",
"pd_generic_female_5.eez/pd_generic_female_5-hat_scarf.lod",
"pd_generic_female_5.eez/pd_generic_female_5-hat_straw2.lod",
"pd_generic_female_1.eez/pd_generic_female_1-hat_fisherman.lod",
"pd_blackhand.eez/pd_blackhand-glasses.lod",
"pd_ms_scientist_male.eez/pd_ms_scientists-glasses.lod",
"pd_ms_thugboss.eez/pd_executioner-h_felthat.lod",
"pd_oilplatform_male1.eez/pd_oilplatform-greycap.lod",
"pd_oilplatform_male1.eez/pd_oilplatform-helmet.lod",
"pd_thugs1.eez/pd_thugs-h_bandana.lod",
"pd_thugs1.eez/pd_thugs-h_felthat.lod",
"pd_thugs1.eez/pd_thugs-o_glasses.lod",
}
These seem to be all the 'hat-type' items in Trix's model file. This list includes your 19 plus another 60 I found. There may be more that fit the 'hat-type' in the sense that we intend to use them.

Jman100

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #6 on: March 10, 2014, 05:56:45 am »
Something to this effect?
Code: [Select]
hats = {
"pd_arcticvillage_male1.eez/pd_arcticvillage_male-hat.lod",
"pd_arcticvillage_female1.eez/pd_arcticvillage_female-headcloth.lod",
"pd_arcticvillage_female1.eez/pd_arcticvillage_female-headcloth2.lod",
"pd_arcticvillage_female2.eez/pd_arcticvillage_female_2-hat_winter.lod",
"pd_arcticvillage_male2.eez/pd_arcticvillage_male_2-hat_winter.lod",
"pd_blackmarket.eez/pd_blackmarket-scarf.lod",
"pd_desertvillage_female1.eez/pd_desertvillage_female-shawl.lod",
"pd_desertvillage_male1.eez/pd_desertvillage_male-turban.lod",
"pd_fishervillage_male1.eez/pd_fishervillage_male-hat_fisherman.lod",
"pd_fishervillage_male1.eez/pd_fishervillage_male-ricehat.lod",
"pd_generic_female.eez/generic_female-ricehat.lod",
"pd_generic_female.eez/generic_female-shawl.lod",
"pd_generic_female_1.eez/pd_generic_female_1-hat_linen.lod",
"pd_generic_female_1.eez/pd_generic_female_1-hat_rice.lod",
"pd_generic_female_2.eez/pd_generic_female_2-hat_linen.lod",
"pd_generic_female_2.eez/pd_generic_female_2-hat_rice.lod",
"pd_generic_female_2.eez/pd_generic_female_2-hat_towel.lod",
"pd_generic_female_3.eez/pd_generic_female_3-hat_scarf.lod",
"pd_generic_female_3.eez/pd_generic_female_3-hat_straw2.lod",
"pd_generic_male.eez/pd_generic_male-hat.lod",
"pd_generic_male_1.eez/pd_generic_male_1-hat_rice.lod",
"pd_generic_male_1.eez/pd_generic_male_1-hat_linen.lod",
"pd_generic_male_1.eez/pd_generic_male_1-hat_fisherman.lod",
"pd_generic_male_2.eez/pd_generic_male_2-hat_fedora.lod",
"pd_generic_male_2.eez/pd_generic_male_2-hat_linen.lod",
"pd_generic_male_2.eez/pd_generic_male_2-hat_weird.lod",
"pd_generic_male_3.eez/pd_generic_male_3-hat_linen.lod",
"pd_ms_airport_female1.eez/pd_ms_airport_female-cap.lod",
"pd_ms_airport_female1.eez/pd_ms_airport_female-hair.lod",
"pd_ms_airport_male1.eez/pd_ms_airport_male-cap.lod",
"pd_tourist_female2.eez/pd_tourist_female-h_fisherhat.lod",
"pd_tourist_female2.eez/pd_tourist_female-h_hair.lod",
"pd_tourist_female2.eez/pd_tourist_female-h_sunglasses.lod",
"pd_tourist_male1.eez/pd_tourist_male-fisherhat.lod",
"pd_tourist_male1.eez/pd_tourist_male-sunglasses.lod",
"pd_ms_civ_strippers_female1.eez/pd_civilian_stripper_female-a_sunglasses.lod",
"pd_ms_civ_strippers_female1.eez/pd_civilian_stripper_female-ht_militarycap.lod",
"pd_ms_civ_strippers_male1.eez/pd_civilian_stripper_male-hat.lod",
"pd_ms_civ_strippers_male1.eez/pd_civilian_stripper_male-cowboyhat.lod",
"pd_ms_civ_strippers_male2.eez/pd_civilian_stripper_male-cowboyscarf.lod",
"pd_ms_doorman.eez/pd_doorman-h_bandana.lod",
"pd_ms_strippers_female1.eez/pd_stripper_female-a_sunglasses.lod",
"pd_ms_strippers_female1.eez/pd_stripper_female-h_hair1.lod",
"pd_ms_strippers_female1.eez/pd_stripper_female-h_hair2.lod",
"pd_ms_strippers_female1.eez/pd_stripper_female-ht_militarycap.lod",
"pd_ms_strippers_male1.eez/pd_ms_stripper_male-hat.lod",
"pd_ms_strippers_male1.eez/pd_ms_stripper_male-sunglasses.lod",
"pd_ms_strippers_male2.eez/pd_ms_stripper_male-cowboyhat.lod",
"pd_ms_strippers_male2.eez/pd_ms_stripper_male-cowboyscarf.lod",
"pd_gov_base01.eez/pd_gov_base-hat.lod",
"pd_gov_base01.eez/pd_gov_base-hatng.lod",
"pd_gov_elite.eez/pd_govnewfix_elite-head.lod",
"pd_gov_elite.eez/pd_govnewfix_elite-head_camo.lod",
"pd_gov_elite.eez/pd_govnewfix_elite-helmet.lod",
"pd_gov_elite.eez/pd_govnewfix_elite-beret2.lod",
"pd_ms_japaneseveterans.eez/pd_ms_japaneseveterans-helmet.lod",
"pd_panaupolice.eez/panaupolice-helmet.lod",
"pd_panaupolice.eez/panaupolice-panaupolice.lod",
"pd_panaupolice.eez/panaupolice-turban.lod",
"pd_reaperselite1.eez/pd_reapers_elite_male-beret.lod",
"pd_reaperselite1.eez/pd_reapers_elite_male-cap.lod",
"pd_roacheselite1.eez/pd_roaches_elite-h_bandana.lod",
"pd_roacheselite1.eez/pd_roaches_elite-h_headwear.lod",
"pd_ularboysbase1.eez/pd_ularboys_base_male-backpack.lod",
"pd_ularboyselite1.eez/pd_ularboys_elite_male-glasses.lod",
"pd_ularboyselite1.eez/pd_ularboys_elite_male-tshirt.lod",
"pd_generic_female_3.eez/pd_generic_female_3-hat_towel.lod",
"pd_generic_female_5.eez/pd_generic_female_5-hat_cloth.lod.lod",
"pd_generic_female_5.eez/pd_generic_female_5-hat_scarf.lod",
"pd_generic_female_5.eez/pd_generic_female_5-hat_straw2.lod",
"pd_generic_female_1.eez/pd_generic_female_1-hat_fisherman.lod",
"pd_blackhand.eez/pd_blackhand-glasses.lod",
"pd_ms_scientist_male.eez/pd_ms_scientists-glasses.lod",
"pd_ms_thugboss.eez/pd_executioner-h_felthat.lod",
"pd_oilplatform_male1.eez/pd_oilplatform-greycap.lod",
"pd_oilplatform_male1.eez/pd_oilplatform-helmet.lod",
"pd_thugs1.eez/pd_thugs-h_bandana.lod",
"pd_thugs1.eez/pd_thugs-h_felthat.lod",
"pd_thugs1.eez/pd_thugs-o_glasses.lod",
}
These seem to be all the 'hat-type' items in Trix's model file. This list includes your 19 plus another 60 I found. There may be more that fit the 'hat-type' in the sense that we intend to use them.

Exactly. Positioning will need fine tuning for many of those objects to where they look right on the player model. Also panay and hacker need their hats adjusted due to their bones not being...accurate..lol.

Other objects (like a backpack) can be used as well, but use Spine1 as the bone for that not Head.


Trip[ABK]

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #7 on: March 12, 2014, 11:03:56 pm »
lool any unusuals?  ;D

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #8 on: March 13, 2014, 02:55:19 pm »
can this be put in the buymenu easily?

Esamir

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #9 on: March 13, 2014, 03:40:28 pm »
No, this thing has different system than buymenu. Can't index IDs and send model ID to execution function. If only there is a way to use ID from array of names, but this may not be correct.

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #10 on: March 13, 2014, 04:12:30 pm »
So basicly hats cannot be used in a proper way? I don't want to add them if it can't be simply spawned in a buymenu or something similar. I don't want to have it in its current form ofcourse.

Edit: Why does Jman100 have it in his buymenu if it is not possible? Seems pretty possible to me. Question is....how?
maybe Jman100 can enlighten us?
« Last Edit: March 13, 2014, 04:44:01 pm by misterff1 »

Esamir

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #11 on: March 13, 2014, 04:45:49 pm »
I took a look into and tried to combine these two scripts. Seems hat can't be indexed regular way as items/weapons/models are. It's just not so easy. I think that indexing array items may make it easier, but no idea right now. I'll look deeper on saturday or sunday, now can't say exactly, will it work or not.

Almost everything is possible, but not that way, I think. Rewriting this from the beginning will make it possible, so, I'll take a look, but later.

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #12 on: March 13, 2014, 05:25:22 pm »
Trix told me that Jman made huge changes to make it work. Maybe it can be a seperate buymenu where it can work at least.

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #13 on: March 13, 2014, 07:05:02 pm »
Trix told me that Jman made huge changes to make it work. Maybe it can be a seperate buymenu where it can work at least.
No offence, but of the 3 times I've heard Jman say something was 'hard' or 'really difficult/extensive' they have been relatively easy changes. From my knowledge of Buymenu and looking over this Hat demo I think this subject is no different.

I plan to work on this soon and will release a buymenu with it working, if no one else does so first.

BTW, didn't the Devs(Philpax?) say they would release a buymenu with this when 1.4 came out?

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: [0.1.4 RELEASE] Hats Demo
« Reply #14 on: March 13, 2014, 07:23:20 pm »
Trix told me that Jman made huge changes to make it work. Maybe it can be a seperate buymenu where it can work at least.
No offence, but of the 3 times I've heard Jman say something was 'hard' or 'really difficult/extensive' they have been relatively easy changes. From my knowledge of Buymenu and looking over this Hat demo I think this subject is no different.

I plan to work on this soon and will release a buymenu with it working, if no one else does so first.

BTW, didn't the Devs(Philpax?) say they would release a buymenu with this when 1.4 came out?

Trix was the one who said it, I believe him.
Also I asked about the color change in the buymenu and the heat seeking missiles and according they will come soon(tm)