#Quick Question on CW-Crafting & CW-Rep pertaining to Skill gain

1 messages · Page 1 of 1 (latest)

frank leaf
#

I have lockpicks that can craft , config file looks similar to this. I changed the custom skill gain but still only receiving 1 and its only showing 1 per craft as skill gain when previewing recipe and or crafting it in the UI. How would I give each item a different value of XP or skill/rep gain ? Or is the custom skill gain for QB metadata and it doesnt work that way with CW-rep. Thanks for any help and dope script

Config.Recipes = {
['lockpick'] = {
category = "Tools",
toItems = {
lockpick = 2,
},
materials = { metalscrap = 12, plastic = 12 },
craftingTime= 3000,
craftingSkill= 10,
customSkillGain = 5,
keepMaterials = { plastic = true }

#

Referring to this portion here, the right hand side skill gain for every item is at 1 and is always 1 no matter what unless I batch craft and when I do, im getting proper Skill gain for each extra craft.. so 10 lockpicks = 10 skill gain

lilac frigate
#

Might be that the UI never got the custom skill gain update

#

Do you still GET the custom xp?

#

Hmm, when is your cw-crafting from?

frank leaf
#

Ok, the UI isnt updating after a craft with new skill gain level.. and custom skill gain does work but doesnt show the number there

lilac frigate
#

Ah I think I know why

frank leaf
#

before and after

#

So it is working, just a visual bug Im guessing

lilac frigate
#

In client.lua on line 412, change recipe to item and it hsould fix it

frank leaf
#

ok let me check 1 second

lilac frigate
frank leaf
#

That works

#

Now my only question is it a safety feature or intentional for the crafting skill xp at top left to not update unless you re open bench?

lilac frigate
#

It can be done

#

but i'll need to write some update functions to it

frank leaf
#

Would that be client side changes? Or is there plans to add that and I should just wait? I dont want to add to much custom stuff outside of config if the script is being maintained and updated and stuff. Id rather keep the script in the most vanilla format for ease of updates and such

lilac frigate
#

It needs both client side and UI side

#

and server side maybe

#

It might be possible to cheese it

#

hmm

frank leaf
#

you think when craft is done it can just check or update UI

lilac frigate
#

crafting level is fetched when opening the crafting menu. The menu closes and then re-opens when you craft.

If you move the setCraftingOpen line down to under the isCrafting bit here it might just update. If you add a short Wait before it it will most likely finish updating the skill

frank leaf
#

ahhh

#

ok

#

yea that could work

lilac frigate
#

if you wanna try that'd be cool. I don't have the server up to test rn 😅

frank leaf
#

yes i will , Im enjoying this script for far.. seems very editable... can do some cool things with UI down road as well.. So yes I can test that not a problem lol

#

and ty for the help too !

lilac frigate
#

NP, hope it works so I can quick-push it without testing kek

frank leaf
#

like this?

lilac frigate
#

Wait with big W and should be before setCraftingOpen

#

also 500 might be enough

frank leaf
#

ok its kind of working

#

so when i come back out of craft...it dont update.. but when i click craft again and it comes back out

#

it updates

#

ok maybe i didnt pay attention

#

maybe it is updating , I just had a server restart push by another dev, so when server boot back up ill check

lilac frigate
#

sounds like it's updating to late

frank leaf
lilac frigate
#

Try 1000

frank leaf
#

ok

#

appreciate ya help, gimmie 5 mins, my food jsut got here and server rebooting.. Ill give you some more feedback in a second

lilac frigate
#

If it doesn't work then it'll most likely get fixed when I get to de-QBifying cw-crafting

frank leaf
#

Loading back into server now, You moving framework compatibility over? or quantifiying everything to 1 script with multiple supports.. like esx,qbox,ox etc ?

lilac frigate
#

Support for multiple cores. Like the RacingApp the update

frank leaf
#

O dope, I havent had a chance to check into the racping app, I need to.. Ok it seems to be working flawlessly now.. I ended up moving the time down to 200 from 500 and having no issues.. Only issue I had since 1 of my admin pull me is I am still able to craft while in menu.. How hard will it be to cross refrence my new position with the bench station to prevent carry or escort afk crafting/spamming?..

lilac frigate
#

Uh, probably not super hard. Just gotta save a coord when opening and check when crafting

frank leaf
#

This is my current client lua setup with said changes

#

ok so some issues to arrise.. its a hit or miss.. so let me try putting wait to 1000

#

and see what happens

#

ok so set to 500.. It updates and works 5/10.. at 1000 its like 7/10.. and 2000 its like 9/10

#

So its working, I can accept that.. it would be nothing to just re open bench anyways worst case.. I dont know if I want to add more wait time on bench as it makes it seem not so smooth the interaction

lilac frigate
frank leaf
#

ok dope. Thanks for the help. Cool script. You happen to have any other features or plans for the script?

lilac frigate
#

removing QB from requirements

#

right now that's the main one haha

#

maybe some UI rework also. Make it a bit nicer.

#

There's also sortof an exploit that I'm dealing with

#

nothing big and kinda specific but still needs to be fixed

frank leaf
#

the UI could use some rework but its not bad.. I do like it. What sorta of exploits?...

lilac frigate
#

Mainly wanna add some color and options.

The exploit is that its possible to get XP even if crafting fails

frank leaf
#

Ahh I see..

So i installed the latest updates for both CW-Rep and CW-Crafting and im receiving this error now

lilac frigate
#

I'm drunk rn I'll take a look tomorrow 👍

frank leaf
#

no worries chief, appreciate it

lilac frigate
#

Is this on a fresh character with no skills added yet?

lilac frigate
#

How does this characters skills in db look?

frank leaf
#

Yes

lilac frigate
#

I am unable to replicate this. Whenver I make a new character they get assigned the skills.

Did you change anything in the rep config?

frank leaf
#

When I get home I'll check again and show u my configs

#

Since the cw rep update do I have to wipe skill data out of SQL?

#

And that error comes up when opening a basic bench of that helps with just lockpick

#

It opens and crafts but throws the error

frank leaf
#

Resetted everything, and since the new changes dont show skill unless you are level 1 I didnt remove the skills out the config file this time?.. Which i dont think would cause the error..

#

also unsure if server restart and re login fixed it

#

It is working as intended with Cw-crafting & cw-rep latest updates .. with zero problems atm

#

Didnt touch db either

frank leaf
#

is there a way to keep the item persistant since im doing multiple craft and dont need 1 item for each?

lilac frigate
#

hahaha

lilac frigate
lilac frigate
frank leaf
# lilac frigate If you hadn't ignored this question I could've told you that that was the issue ...

I was just trying to get back to you since I had forget to. Yea I figured it was reading all skills.. Didnt see a issue before hashing them out but once you made changes it was a issue.. I jsut kept the default rep skills in for now. I didnt mean to ignore any questions I just was mental noting everything I had experience to kinda just update you ? I guess.. Either way script running good everything is solid. I appreciate you.

frank leaf
#

So from this screenshot here.. The recipe requires a ammo mold and keep item is set to true.. I cant multi craft unless i have say more ammo molds in my inventory.. This goes for anything that is on keep

lilac frigate
frank leaf
#

Ok sweet thank you for clearing that up

#

How would you think to go about having it check keepmaterial when calculating the outcome? so it always remains 1.. Is not possible due to QB/ESX framework? or just something you have yet to implement or want to implement?

lilac frigate
#

It's not something I've implemented no

#

It'd need rework of client, server and NUI side of things

frank leaf
#

ok dope maybe ill look into it and If i find a solution Ill let cha know. For now I suppose I can just set up the ammo you get back and make it a 1 time only each time to craft it for now

lilac frigate
#

Yeah, you can also have several recipes with different batches

#

so one ammo recipe creates 10, one creates 50 one creates 100 or something

frank leaf
#

yep thats what ima do simplify it for now ya no

frank leaf
#

Notice when placing benches down upon re-entering the location they are floating. What could be causing this?
Nothing has been deleted or edited outside of config. No errors just when I drive back to crafting bench its floating. I have noticed this only is working on the spawned tables and not the general prop tables that are static.